public static void method name () {processing;}
public static void hello() {
System.out.println("hello world");
}
Available by changing the type and number of arguments
Same method name but different arguments
public static void hello() {
System.out.println("hello world");
}
public static void hello(String name) {
System.out.println("Hello" + name + "Mr.");
}
Recommended Posts