Answers for "how to call a function in main 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 "how to call a function in main java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language