Answer Posted / vijayakumar chinnasamy
If a java source code file contain public class then the
source code file name should be public class name other
wise compiler error.
if a java source code does not contain the public class
then the name may be class name or anything ,not a problem.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
How do you sort arraylist in descending order?
What is the difference between path and classpath variables?
Which class is the superclass for all the classes?
Is static variable stored in heap?
What are the important features of Java 10 release?
Which container method is used to cause a container to be laid out and redisplayed in java programming?
What is tree in java?
What is a boolean used for?
What is difference between filereader and bufferedreader?
What happens if an exception is not handled in a program?
What is jit compiler in java?
Can we modify the throws clause of the superclass method while overriding it in the subclass?
What are the differences between graph and tree?
how can you catch multiple exceptions in java?
Can you declare an interface method static?