Conversion of primitive data types automatically to their corresponding wrapper classes is called AutoBoxing and the reverse of this operation is called UnBoxing.
Ex:
Long L = new Long(100);
long x = L;
Now x will have a value 100.
Chat with our AI personalities
New to Java 5 is a feature known variously as: autoboxing, auto-unboxing, boxing, and unboxing. We'll stick with the terms boxing and unboxing. Boxing and unboxing make using wrapper classes more convenient. In the old, pre-Java 5 days, if you wanted to make a wrapper, unwrap it, use it, and then rewrap it, you might do something like this:
Integer y = new Integer(111);
int x = y.intValue();
x++;
y = new Integer(x);
System.out.println("y = " + y);
Now, with new and improved Java 5 you can say
Integer y = new Integer(111);
y++;
System.out.println("y = " + y);
Both examples produce the same output:
y = 112
And yes, you read that correctly. The code appears to be using the postincrement operator on an object reference variable! But it's simply a convenience. Behind the Scenes, the compiler does the unboxing and reassignment for you.
Note: When == is used to compare a primitive to a wrapper, the wrapper will be unwrapped and the comparison will be primitive to primitive
variable_name=variable_name+5;
The Javac is the java compiler javac.exe is a process associated with Java(TM) 2 Platform Standard Edition 5.0 Update 5 from Sun Microsystems, Inc.. Java Capusal this is a java compiler
Go to the link below
Each statement in Java ends with a semicolon, for example: int a; a = 5; int b = 10;
Java is a programming language which comes in many varieties. Some of the common ones are Micro Edition (ME), Standard Edition (SE), and Enterprise Edition (EE). Java EE includes more classes than the other versions, including classes and packages designed to make developing client-server (and other internet-based communication) projects a faster process. Java EE 5 just means the fifth major version of the Java EE suite.