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
Which of the following classes will have more memory allocated?
What are the parts of a method?
does java support pointers?
State the difference between strings and arrays.
Give any two differences between C++ and java.
What is json parser in java?
Write a program to show whether a graph is a tree or not using adjacency matrix.
What is anagram word?
What is regex in java?
What is a method in java?
Define a java class.
How finally used under exception handling?
What is file in java?
Can a class extends itself in java?
Why do we need variables?