• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Query

 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic