Why to give the file name same as the public class name in
java?
Answer Posted / mahesh
First of all, it only has to be the same when the class is
public. And there is no explicit reason for that, it's just
a convention that came along with old versions of java and
people got used to it... They say it's because of the
limited capabilities of the compiler to compile
dependencies.
| Is This Answer Correct ? | 9 Yes | 4 No |
Post New Answer View All Answers
How are multiple inheritances done in Java?
What is array class in java?
What is meant by JVM? Is JVM platform independent or not?
What is arguments in java?
What is a data structure java?
What is better- service oriented or batch oriented solutions?
What is java util collection?
Explain a situation where finally block will not be executed?
How many types of operators are there?
What is identifier give example?
How objects are stored in java?
What are wrapper classes in java?
Explain OOPs concept.
What are the advantages of inner classes?
Why do we need wrapper classes?