+ 1
What is public static viod main?
Let me know clearly about main method and system.out.println statement. why should we write in that manner only
2 Réponses
+ 3
public=public keyword is used for control the access of various class member.if it is public then every variable or other class can use it.
static=Method to be executed without an object of the class.
void=means method does not return any value.
main=it's main method it's just name.
String=predefined class.
args[]=it's variable of String class.
System=it's predefined class in java package.
out=it is object of print stream class.
println=it's method which is defined in print stream.or we can say it predefined function.
+ 2
The main loop/method/function is the entry point to your program and is what maintains it until you close the program. Without it, your program wouldn't be able to start because there would be no starting point.