+ 2
Waht is the difference between "int" and "Integer" in java ?
What are the primitive data type. Is "String" a primitive data type. The way coding works, i can see that "int" is a primitive data type but "Integer" is not. can anyone explain on this.
3 Answers
+ 8
String is a class, Integer is a class, int is primitive, mention the camel case names of the classes. The classes provide useful methods, a primitive doesn't. See
http://docs.oracle.com/javase/7/docs/api/java/lang/Integer.html?is-external=true
for the provided methods of Integer.
To handle the boxed primitives also search for 'outboxing' on Google.
+ 2
thanks guys.