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 |
use of wrapper classes?
What do you mean by multithreaded program?
Can vector have duplicates in java?
Is {a, n, d} a palindrome? If you are given a random string, is it a palindrome or not?
What is the significance of java packages?
Can we override constructors in java?
Say any two properties in beans?
explain different ways of using thread? : Java thread
what is the difference between static class and singleton class? can we create static class?
2 Answers L&T, Octazen, Vamsi Labs,
What is a deadlock ?
Define inheritance?
What is logical variable?