Why only one Class is public in one file? Explain in
details. Thanks in Advance.
Answers were Sorted based on User's Feedback
Answer / ganesh slv
Sorry for all my answers above.. I misunderstood lot of things.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / madan
public static void main(String args[])
this is command line args.. we need to declare public because, this is the main method, from any class, any package, we have to call, so it will be public.. same as class is also public...suppose, if u declare two class as public, it show error, we have to save a file somefile.java...
i think u understood based on above explanation..
| Is This Answer Correct ? | 0 Yes | 2 No |
How can I become a good programmer?
What is boolean logic?
What is a class component?
Give me example of derived data types.
What is void keyword?
explain the concept of virtual method invocation in polymorphism in detail?
How do you make an arraylist empty in java?
What is mvc in java?
In which order the iterator iterates over collection?
relation between list and linked list
What is a J2EE component? List out all the component?
What is treemap in java?