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
Why is the main method static?
What are recursive functions?
What is return used for in java?
What is a local class in java?
Can we have try without catch block?
What is double parsedouble in java?
What is the different types of functions?
What is final method in java?
What is anagram in java?
Does A Class Inherit The Constructors Of Its Superclass?
What is difference between stringbuffer and string?
What are checked exceptions?
23. Storage space in java is of the form Stack Queue Heap List 24. What is java code embedded in a web page known as Applets Servlets scriptlets snippets 25. Which of the following attributes are compulsory with an
make a method which any number and any type of argument and print sum of that arguments.....
What is yield () in java?