Methods
Lesson 13Author : 🦒
Last Updated : October, 2017
public static void sayHi(){ System.out.println("Hello"); }
A parameter is a special variable that a Method will use to perform it’s task in a way that is more specific to the needs of the caller. An argument is the value the caller gives to the Method which will get stored inside the parameter variable.
public static void sayHi(String name, int age){ System.out.println("Hello " + name + " you are " + age); }