0
what is public static void main (String arts [ ] ) ???
4 Answers
+ 1
In java it is a way to declaring main method just like in c by void main
+ 1
⢠Public : this method can be accessed publicly. Such that any instance can call this method.
â˘Static : This method will not change within the instances. Also does not refer to any non-static objects.
â˘Void: This method returns nothing. This is return type.
â˘String: argument list type. It is string array. You are declaring it by []
â˘args: parameter name. it is an array.
Alternatively, you can do this also.
public static int main(String[] args)
public static void main(String args[])
Hope this has solved your doubt.
+ 1
main method will be called by JVM not by the programmer so JVM should call with out the need of object so it was declared as static
0
static refers to...?