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
Is null function in java?
If I only change the return type, does the method become overloaded?
Is string a datatype?
How do you use substring in java?
How the interruptible method gets implemented?
What is the benefit of singleton pattern?
How can you make sure that your singleton class will always return single instance in multi-threaded environment?
What is a numeric digit?
What happens when I use / and % with a negative numerator?
Is array synchronized in java?
Is empty string in java?
What is the impact of declaring a method as final?
'A class is a template for an object' explain this statement.
What exactly is java?
What is a vararg?