rgb192
asked on
Is String a Primitive datatype or Non-Primitive? (Since String is an Object)
I know String is a Primitive data type, but it can also be an Object.
If it's an Object, how can it be Primitive?
If it's an Object, how can it be Primitive?
String s1="hello";
String s2=new string ("hello");
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
could you give an example of a wrapper
could you give an example of a wrapperWow, an example was in that last post from it_saige... "While int is a primitive, Integer wraps the value of the primitive type int in an object"
The others are... Long, Short, Double, Float, Character, Boolean and Byte
ASKER
thanks for int string wrapper
ASKER
Is integer an object?