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
What is __ init __ functions?
What is an infinite loop in java? Explain with an example.
what is mutual exclusion? How can you take care of mutual exclusion using java threads? : Java thread
How do you ensure that n threads can access n resources without deadlock?
What is difference between stringbuffer and string?
Objects or references which of them gets garbage collected?
How do you compare values in java?
How many ways can you break a singleton class in java?
What is the importance of hashcode() and equals() methods?
What is a treeset in java?
What is oops in java?
Explain the advantages of packages in java?
What is a default constructor and also define copy contrucyor?
What is a class instance variable?
How many types of flags are there?