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
What is strings in java?
How do you get the length of a string in java?
Explain the difference between treeset and treemap in java?
What are the types of inner classes (non-static nested class) used in java?
String and stringbuffer both represent string objects. Can we compare string and stringbuffer in java?
Give any two differences between C++ and java.
Why do we need strings in java?
What are void pointers?
Where can I find jdk in my computer?
Why string is not a wrapper class?
What is a boolean expression in java?
What is the purpose of void class?
How hashmap works in java?
What is the use of jtable?
What is a nested structure?