Answer Posted / niranjanravi
A java source code file contains atmost one public class
or interface defined with in the file.Java source code
files takes the name of the public class or interface that
is defined with in the source code file.If no public class
or interface is defined with in the source code file then
file must take on a name that is different than its public
class or interface.
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
When will you define a method as static?
Why there are some null interface in JAVA? What does it mean? Give some null interface in JAVA?
I want to print “hello” even before main is executed. How will you acheive that?
Why do we need singleton?
Can you create an object of an abstract class?
What is the static import?
Difference between comparator and comparable in java?
I don’t want my class to be inherited by any other class. What should I do?
How can a gui component handle its own events?
What is a finally block? Is there a case when finally will not execute?
Write a program to reverse array in place?
Explain illegalmonitorstateexception and when it will be thrown?
Which browsers work with java?
What are the different ways of implementing thread? Which one is more advantageous?
How can you make sure that your singleton class will always return single instance in multi-threaded environment?