| Author |
problem with the same data type and class
|
harsh garg
Ranch Hand
Joined: Jul 13, 2008
Posts: 33
|
|
|
why String (data type and class) of java have the same name?no other data type like this in java?
|
 |
Ankit Garg
Saloon Keeper
Joined: Aug 03, 2008
Posts: 9191
|
|
String is not a datatype. It's just a class. It just have some special treatment by the compiler because of which you can write this
String s = "Hello World";
The compiler internally converts this into
String s = new String("Hello World");
|
SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
|
 |
 |
|
|
subject: problem with the same data type and class
|
|
|