This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes public class in package Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "public class in package" Watch "public class in package" New topic
Author

public class in package

Arun Maalik
Ranch Hand

Joined: Oct 25, 2005
Posts: 216
Dear sir suppose i would like to devlope a package as follow

package abc;
public class first{
//fun1
//fun2
}
now i will save this package with first name now if i want to store many public class in the abc package then how can i do that because one class contane only one public class , are you getting sir what i want to say hope yes. so how can i do that sir how?

with regad
Arun kumar maalik
Surendra Kumar
Ranch Hand

Joined: Jul 04, 2006
Posts: 235
you're not storing this package, but you're storing 'first' class in package 'abc'.
You can create as many classes as you want in this package.
Ivan Rebrov
Ranch Hand

Joined: Jul 09, 2006
Posts: 30
You should create multiple files. Each public class in it's own separate file.
[ August 12, 2006: Message edited by: Ivan Rebrov ]

SCJP 5.0 - 95%<br />Preparing for SCWCD
Arun Maalik
Ranch Hand

Joined: Oct 25, 2005
Posts: 216
Thanks sir i understood
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: public class in package
 
Similar Threads
protected member access
import my package/class in Redhat9
default package
Implicit Constructor
About TagExtraInfo class?