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 |
what is daemon thread and which method is used to create the daemon thread? : Java thread
What variables are stored in stack?
1.what is the exact difference between applet and frame? 2.Do we use main method in frames?
How do you define a set in java?
What is difference between Heap and Stack Memory?
Write a regular expression to validate a password. A password must start with an alphabet and followed by alphanumeric characters; its length must be in between 8 to 20.
what is the use of reference variable
What does the “final” keyword mean in front of a variable? A method? A class?
What is the difference between access specifiers and access modifiers in java?
Explain about exception propagation?
how to print the below in java? * * * * * * * * *
What is difference between hashset and hashmap?