Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

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");
    }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #call #function #main #hava
ADD COMMENT
Topic
Name
5+1 =