can two class in a code be public??if yes then how??
Answer Posted / sreejesh1987
One java source file must have only one top-level(top level means not an inner class) public class with the same name as the name of the source file .
You can have inner classes to a class which are public. Hence in this way it is possible to have more than one public class in a single file.
Is This Answer Correct ? | 11 Yes | 2 No |
Post New Answer View All Answers
Is sizeof a keyword in java programming?
Explain the JDB in depth & command line.
What are peerless components?
What is e in java?
Is java same as core java?
What is ternary operator?
Does set allows null in java?
Can a static method be overridden in java?
What is the difference between length and size in java?
What does a za z0 9 mean?
What are access specifiers in java ?
Why does java have two ways to create child threads?
how we can make a read-only class in java?
What is substring in java?
What is super in java?