Horje
main method in java Code Example
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
//Java main
class myClass {
    public static void main(String[] args) {
        //code
    }
}
main method in java
It is a keyword which is when associated with a method, makes it a class 
related method. The main() method is static so that JVM can invoke it without
instantiating the class. This also saves the unnecessary wastage of memory which
would have been used by the object declared only for calling the main() method by 
the JVM.




Java

Related
vibration android studio Code Example vibration android studio Code Example
java float get 2 decimals Code Example java float get 2 decimals Code Example
ordenar numeros java Code Example ordenar numeros java Code Example
how to get the width and height of display device in java Code Example how to get the width and height of display device in java Code Example
java toarray Code Example java toarray Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8