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
Can we define private and protected modifiers for the members in interfaces?
What are the java ide's? Explain
Can we declare a static variable inside a method?
Write code of any action class?
Explain the difference between abstraction and encapsulation.
What is close method? How it's different from Finalize & Dispose?
What is size_t?
what invokes a threads run() method? : Java thread
What is method overriding in java ?
In the below example, how many string objects are created?
Can we extend a class with private constructor?
Can we call a non-static method from inside a static method?
What is a literal coding?
How do I start learning java?
Is void a data type?