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 Query Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Query" Watch "Query" New topic


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 ???

Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24166

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 , just as you would do for a class.

[Jess in Action][AskingGoodQuestions]
Consider Paul's rocket mass heater.
subject: Query
Similar Threads
What to put into a SAR file?
JDBC Call-Level Interface question.
Access to constants
interface is nothing but a pure abstract class. why interface does not has constructor
Interface extending another Interface