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 |
is it possible to instantiate the math class?
What is a linkedhashmap java?
explain multi-threading in java?
Does java support multi dimensional arrays ?
Explain what access modifiers can be used for variables?
Define canvas?
What is the advantage of OOP in java?
Why does java not support operator overloading?
Explain garbage collection in java?
What is the loop in java?
printstream class method println() is calling using System class and its static object out .how it is explain any one in detail with example ?
Does sprintf add a null terminator?