File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

Singleton class, class loader, string literals

Agarwal Priyanka

Joined: Jul 25, 2008
Posts: 20

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
Ranch Hand

Joined: May 31, 2007
Posts: 3371
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 -->

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 job hunting know how] | [Java resumes]
I agree. Here's the link:
subject: Singleton class, class loader, string literals
It's not a secret anymore!