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
List the interfaces which extends collection interface?
What is singleton class in ruby?
Difference between a process and a program?
Make a data structure and implement an algorithm to print all the files in a directory. (The root directory can have sub-directories too.)
What are the two ways to create a thread?
What is map in java?
What is the use of static class?
What is the properties class in java programming?
What are inbuilt functions in java?
What is canonical name in java?
What is a lock or purpose of locks in java?
How to restrict a member of a class from inheriting by its sub classes?
Why java strings are immutable in nature?
What is bytecode in java ?
Can we use a switch statement with strings?