Answer Posted / jitu
In case of autoboxing directly the value of the constructor
assign to a variable.i.e object of wrapper class directly
assign to a variable.but it is only possible in case of 1.5
version.
Ex:public class X
{public static void main(String a[])
{Integer i1=new Integer("20");
Integer i2=new Integer("20");
int m1=i1;
int m2=i2;
S.o.p(m1+m2);o/p-20
Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
What is one third plus one third as a fraction?
Is singleton a bad practice?
If we allocate the memory using 'new' & de-allocated using 'free' then what will happen?
What is a line separator in java?
What is http client in java?
Compare overloading and overriding?
What is the class in java?
What is difference between array and vector?
What is difference between add() and addelement() in vector?
Is array an object in java?
What are instance variables?
Is java still relevant?
What do you understand by an io stream?
What is :: operator in java 8?
Can you add null to a list java?