Can two classes exist in a single .java file?
Reply quick, please.
jackbauer24 0 Junior Poster
Recommended Answers
Jump to Postyou can have unlimited classes in one file, but you can only have one public class in one file, and this class needs to have the same name as the Java file.
Jump to Postthat's not in one java file.
they print the code after each other, but they assume you know where the new file starts.
All 8 Replies
DavidKroukamp 105 Master Poster Team Colleague Featured Poster
stultuske 1,116 Posting Maven Featured Poster
jackbauer24 0 Junior Poster
stultuske 1,116 Posting Maven Featured Poster
jackbauer24 0 Junior Poster
SasseMan 49 Junior Poster
jackbauer24 0 Junior Poster
jackbauer24 0 Junior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.