public class Madam { public static void main(String[] args) { int a = 5; System.out.println(cube(a)); } static int cube(int theNum) { return theNum * theNum * theNum; } }
125
Compilation Error because cube is already defined in the java.lang.Math class.
Throws an ArithmeticException.
Compilation Error or Runtime Error for some other reason.