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 to find the given number is a prime number or not by getting input from the user
How can we create objects if we make the constructor private ?
Can a function return a function?
What is the difference between synchronized and synchronized block?
What is the final class?
List implementations of list interface?
How do you replace a string in java?
What is contractor means and methods?
Explain the term virtual machine?
How to solve the problem of generating the unique hash keys with hash function?
What is a generic type?
How much ram can a 64 bit processor theoretically?
What are the different ways of creating thread?
Print Vertical traversal of a Binary Tree.
Does sprintf allocate memory?