I have an interesting question that implies the use of Hashtables ; I am developing for Nokia S40 (with conformance level 1.4)
As I expect the Hashtable will work:
Hashtable table = new Hashtable(); table.put(1, "Hello World");
However, I get the error message:
The put(Object, Object) method in the Hashtable type is not applicable for arguments (int, String)
However, when I create a link to an object and pass the link, it works great! Why?
Working example:
Hashtable table = new Hashtable(); Integer test = new Integer(1); table.put(test, "Hello World");
Any explanations would be great!
source share