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 you extend singleton class?
Give few examples of final classes defined in Java API?
How many types of assembly languages are there?
What is private public protected in java?
How do you do absolute value in java?
What is bytecode in java ?
How do you create a null object?
Write a function for palindrome and factorial and explain?
When do we use hashset over treeset?
Can an interface be final?
Can singleton class be cloned?
What is the difference between pass by reference and pass by pointer?
What is java command?
How do you compare two strings lexicographically?
what is predefined function in java?