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 a numeric string?
When will you define a method as static?
Is java a utf 8 string?
Define inheritance with reference to java.
What is a default method?
What is difference between java and java ee?
What is the difference between keyword and identifier?
What is a type parameter in java?
Is it possible to instantiate the abstract class?
Why do we use string?
What is the exact difference in between Unicast and Multicast object? Where will it be used?
What is the maximum size of hashmap in java?
What are the files generated after using IDL to java compiler?
What is object data type?
What is passed by reference and pass by value ?