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
what is predefined function in java?
What is the difference between and ?
What is difference between null and void?
State some advantages of java?
Can java object be locked down for exclusive use by a given thread?
What is a marker interface?
What is difference overloading and overriding?
What does sprintf mean?
What is the difference between stream and buffer?
What is the meaning of course?
Explain what do you mean by functional overloading in java?
Define Multiprogramming and Multiprocessing in java.
What is the purpose of the file class in java programming?
What are access specifiers in java ?
What is an argument java?