why we write public static void main (String args[])
in core java plz explain briefly??????????????????
Answer Posted / sreenivas p
JVM looks for the main method(from where it starts
execution) with the same signature(public static void
main(String args[])) if it coud not find throws
NoSuchMethodError.
valid signatures are:
public static void man(String args[])
static public void main(String a[])
Invalid signatures
static void main()
public static main(String args[]) etc..[treats these
are all as general methods ]
| Is This Answer Correct ? | 16 Yes | 3 No |
Post New Answer View All Answers
What is use of map in java?
Is math class static in java?
What is parsing in java?
Is array a class in java?
Can a class be defined inside an interface?
Why do we use threads in java?
Give the hierarchy of inputstream and outputstream classes.
What is boolean in java?
whatis Home interface and Remoteinterface? with example?
What will happen if there is a default method conflict as mentioned above and we have specified the same signature method in the base class instead of overriding in the existing class ?
What is complexity in java?
How variables are declared?
Explain the access modifiers for a class, method and variables?
Can we make main() thread as daemon?
What is better - 'bit-shift a value' or 'multiply by 2'?