Answer Posted / durga ganesh reddy
autoboxing is that the conversion of primitive data types
into wrapper class objects automatically.By using generic
types of java 1.5,we an acheive it easily.By declaring, the
collection classes as shown below we can do it.
HashSet<Integer> hs=new HashSet<Integer>();
hs.add(1);
hs.add(2);
Iterator it=hs.iterator(0;
while(it.hasNext())
System.out.println(it.next());
| Is This Answer Correct ? | 11 Yes | 0 No |
Post New Answer View All Answers
What are recursive functions? Give some examples?
What is difference between add() and addelement() in vector?
Can list be final in java?
What is the transient keyword?
What environment variables do I need to set on my machine in order to be able to run java programs?
What are the advantages of assembly language?
How can you share data between two thread in Java?
How do you check if two strings are equal in java?
Can we compare two strings in java?
Can a final method be overloaded?
How would you convert bytes to string?
Is hashmap thread safe?
What about features of local inner class?
What is difference between null and void?
What exactly is java?