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
List implementations of list interface?
How do you declare an array in java?
What is a treeset class?
How many unicode characters are there?
What is Hierarchy of exception?
What is number data type?
What's the purpose of using break in each case of switch statement?
What is palindrome in java?
What methods are used to get and set the text label displayed by a button object?
Why pointers are not used in java?
What is parse method?
Is string a class in java?
What is difference between ++ I and I ++ in java?
What happens if constructor is private?
Explain the difference between association, aggregation and inheritance relationships.