This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Beginning Java and the fly likes problem with the same data type and class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "problem with the same data type and class" Watch "problem with the same data type and class" New topic
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
Sheriff

Joined: Aug 03, 2008
Posts: 9293
    
  17

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem with the same data type and class