Explain class A{}
class B{}
class C{}
all the three classes are saved in a single file name, what
the name should i provide to the file ,in what file name
should i run the program? Ple Explain
Answer Posted / sarabjit singh
when a code is to wriiten in a single file, no matter how
many number of classes being used, the de-facto standard
for naming the file is <ClassName>.java,
where <ClassName> is the name of the class containing the
main function().
Hence in our case, if class A is having the main() method,
then the file name would be A.java.
Is This Answer Correct ? | 14 Yes | 2 No |
Post New Answer View All Answers
What is a boolean in java?
Is a method a procedure?
What is the format specifier?
Do we have pointers in java?
How do you square a number in java?
What is the difference between logical data independence and physical data independence?
Will the jvm load the package twice at runtime?
What language is an assembler written in?
What does it mean that strings are immutable?
In how many ways we can do exception handling in java?
What is the maximum length of a url?
What will happen if non-synchronized method calls a static synchronized method and what kind of lock it acquires?
What does math floor () do?
What is an example of a boolean?
What are the six ways to use this keyword?