Why only one Class is public in one file? Explain in
details. Thanks in Advance.
Answer Posted / malay
I think that you call only public classes from outside.Now
all these classe are kept in a .java file.So there should
be a one to one mapping between a public class
& .java/.class file.If there are more than one public
classes then JVM has to maintain a tracker that what all
classes are in single .java/.class file.Presently its easy
for JVM coz when a class is called it simply goes & load
the .class file with that name.
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
What is default constructors?
Can we have 2 main methods in java class?
What is used of static keyword in java?
Is singleton class immutable?
What does string mean in java?
Difference between string s= new string (); and string s = "abv";?
Why is java called the platform independent programming language?
Can long be null in java?
What are internal and external variables?
What is a byte string?
What is break and continue statement?
Compare Mutex and Semaphore in java.
What is int short for?
Name four container classes.
What is the difference between the font and fontmetrics classes in java programming?