can two class in a code be public??if yes then how??
Answer Posted / siva
NO only one class should be public if we write multiple
classes in a same file.we can write multiple class files in
a single file.if main() is there in one of the classes then
it should be declare as public.
| Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
Can a static method be overridden in java?
What is ++ a in java?
What are the super most classes for all the streams?
What is the basic concepts of OOPS?
What is the purpose of checked and unchecked exceptions in JAVA?
What is data structure in java?
How can we break singleton in java?
Explain about method local inner classes or local inner classes in java?
What is difference between jdk,jre and jvm?
What are the differences between heap and stack memory in java?
What are the features in java?
Are generics important java?
What is the SimpleTimeZone class?
What is defined as false sharing in the context of multithreading?
Can a class with private constructor be extended?