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 string pool in java?
What is gui programming?
How do you use substring in java?
Which is better list or arraylist in java?
Which is easier netbeans or eclipse?
What are the procedures?
What are the steps involved to create a bean?
What is ternary operator? Give an example.
Write a program to print fibonacci series up to count 10.
What is the difference between class & structure?
How many types of classes are there in java?
What is the difference between jdk, jre, and jvm?
What is java abstraction with example?
Addition to previous section relative word 5th one was Putrid ans: rotten, also there was prob. in 1st section on bucket weight ans:10kg, also there was a prob. on train speed to find bridge length ans:800 mtrs.
What are the two parts of a conditional statement?