Answers for "methods in main java"

2

java main method

public static void main(String args[]){}
Posted by: Guest on February-17-2020
2

main method java

public class Test {

static void main(String[] args){

	System.out.println("Hello World");
	
}
}
Posted by: Guest on March-12-2020
0

how to write a method inside main in java

public class Main {
  static void myMethod() {
    System.out.println("I just got executed!");
  }

  public static void main(String[] args) {
    myMethod();
  }
}

// Outputs "I just got executed!"
Posted by: Guest on May-31-2021

Code answers related to "methods in main java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language