File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Singleton class, class loader, string literals Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Singleton class, class loader, string literals" Watch "Singleton class, class loader, string literals" New topic
Author

Singleton class, class loader, string literals

Agarwal Priyanka
Greenhorn

Joined: Jul 25, 2008
Posts: 20
hello......

can any body give me the proper definition of singleton class, class loader, string literals.


keep trying...thats the way to success...<br />with best regards...<br />p.agarwal
arulk pillai
Author
Ranch Hand

Joined: May 31, 2007
Posts: 3219
A singleton is a single instance of a class per JVM per class loader. Please google for Java singleton design pattern for example.

Classes are introduced into the Java environment when they are referenced by name in a class that is already running. There is a bit of magic that goes on to get the first class running (which is why you have to declare the main() method as static, taking a string array as an argument), but once that class is running, future attempts at loading classes are done by the class loader. from --> http://www.javaworld.com/javaworld/jw-10-1996/jw-10-indepth.html



String name = "Java" is a STring literal. All string literals in Java programs, are implemented as instances of String class. Strings in Java are 16-bit Unicode.


Java Interview Questions and Answers Blog | Amazon.com profile | Java Interview Books
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Singleton class, class loader, string literals