Answers for "call a function in main in java"

0

can i call another function from main hava

package learningjava;

public class helloworld {
    public static void main(String[] args) {
        new helloworld().go();
        // OR
        helloworld.get();
    }

    public void go(){
        System.out.println("Hello World");
    }
    public static void get(){
        System.out.println("Hello World, Again");
    }
}
Posted by: Guest on October-21-2020

Code answers related to "call a function in main in java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language