Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Beginning Java
Search Coderanch
Advance search
Google search
Register / Login
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
Tim Cooke
paul wheaton
Ron McLeod
Jeanne Boyarsky
Sheriffs:
Paul Clapham
Saloon Keepers:
Tim Holloway
Roland Mueller
Bartenders:
Forum:
Beginning Java
multiple classes in a single file
manohar reddy
Greenhorn
Posts: 12
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Can we write multiple classes in a single .java file?
If yes then, can all of them be public classes
If we have multiple classes in one .java file, what should be the name of the
java
file?
[ changed the subject to something meaningful - Jim ]
[ November 19, 2007: Message edited by: Jim Yingst ]
Bear Bibeault
Sheriff
Posts: 67756
173
I like...
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Please be sure to take the time to compose descriptive subjects for your posts;
read this
for more information.
What is "pmr" supposed to mean?
Also, please take the time to choose the correct forum for your posts. This forum is for questions on
Servlets
.
This post has been moved to a more appropriate forum.
[ November 18, 2007: Message edited by: Bear Bibeault ]
[
Asking smart questions
] [
About Bear
] [
Books by Bear
]
David O'Meara
Rancher
Posts: 13459
I like...
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
HI, welcome to the Ranch!
You have a better chance of a meaningful answer if you put effort into your question.
A meaningful topic helps ( I don't know what "pmr" means), as does selecting the correct forum.
colton peterson
Ranch Hand
Posts: 97
I like...
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
You can have multiple classes in one file, but only one public class. The name of the file should be the same name as the public class.
www.mormon.org
Farmers know to never drive a tractor near a honey locust tree. But a tiny ad is okay:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
classes
name of java file
Regarding public class
Question:Kathy's book P.11 (there is no way to declare multiple classes in a file
serialize multiple java classes in single file
More...