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
Write a code to show a static variable?
What is return data type?
What exactly is methodology?
What are the problems faced by java programmers who don't use layout managers?
What is static and final keyword in java?
Is hashset sorted in java?
What is n in java?
What is nan inf?
What is join () in java?
What is the main purpose of java?
Explain about doubly linked list
Why are the objects immutable in java?
What is array class in java?
Can list be final in java?
What is unsigned char?