Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

how to create a function in java

package com.company;

public class Main {
    static void one(){ // youCanPutWhatEverNameYouLikeInThePlaceOf"One"
        System.out.println("HELLO");
    }
    public static void main(String[] args) {
        one(); //theTerminalShouldSay"HELLO"
    }
}
 
PREVIOUS NEXT
Tagged: #create #function #java
ADD COMMENT
Topic
Name
3+4 =