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
Are true and false keywords?
how are methods defined?
Is singleton class thread safe?
Is a method a procedure?
Explain about exception propagation?
What is bufferedwriter?
Explain about fail fast iterators in java?
What is string pool in java?
Is the empty set a singleton?
Explain why wait(), notify() and notifyall() methods are in object class rather than in the reading class?
Is node a data type in java?
What method is used to specify a container's layout in java programming?
What is complexity in java?
What does escaping a character mean?
Why java uses the concept of the string literal?