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
Explain the difference between extends thread vs implements runnable in java?
Explain the importance of finally over return statement?
What is a method in coding?
what is meant by encapsulation?
What is a class in java?
What are the differences between checked exception and unchecked exception?
Can we use synchronized block for primitives?
What is a bufferedreader?
What is thread safe in java?
What is singleton math?
What is the point of java?
What is serialization in java?
What are packages in java?
Where is singleton pattern used?
Does java have extension methods?