aspose file tools*
The moose likes Beginning Java and the fly likes Query Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Query" Watch "Query" New topic
Author

Query

Kartik Mahadevan
Ranch Hand

Joined: Feb 16, 2005
Posts: 47
Could someone please tell me what is this ClASSPATH and what is it's use?
Secondly can constructors be private?
Suppose I have to define only one interface in a FILE and no other code (no other class except interface )how should I save this file ?As .java ???


Thanks
Regards
M.Kartik
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

You can read about CLASSPATH here.

Yes, constructors can be private. Only code within the class can use such a constructor, of course, but sometimes this is handy -- for example, if you need to create a Singleton class.

If the interface is named Foo, then name the file Foo.java , just as you would do for a class.


[Jess in Action][AskingGoodQuestions]
 
 
subject: Query