main method java
public class Test {
public static void main(String[] args){
System.out.println("Hello World");
}
}
main method java
public class Test {
public static void main(String[] args){
System.out.println("Hello World");
}
}
java define main function
public class Program {
public static void main(String[] args){
System.out.println("Hello, World!");
}
}
main method
Main method / main public static void main (String [] arg)
-Public can be anywhere inside or outside package Access Modifier
-Static keyword it means there is only 1 copy specific variable or method and main usage of static you can access it no object. You can call from the class name. It belongs to class
-void means no return type no value at the end
-main is just the name of the method this is method is responsible for running the java application.
main method java
public class Test {
static void main(String[] args){
System.out.println("Hello World");
}
}
java main method
// for autocomplete just type
main
// and a shortcut shoould apear
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us