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 the syntax and characteristics of a lambda expression? Explain
What is ellipsis in java?
What does the three dot emoji mean?
When will you define a method as static in Java?
What's the default access specifier for variables and methods of a class?
How to perform selection sort in java?
Why string is a class?
What is volatile keyword in java
Is map ordered in java?
Difference between object and reference?
Can a constructor be protected?
Is string is a data type in java?
Is vector synchronized in java?
What are implicit objects in java?
what do you mean by classloader in java?