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; } }
{
public static void main(String[] args) { int a = 5; System.out.println(cube(a)); } static int cube(int theNum) { return theNum * theNum * theNum; } }
Anonymous Poll
51%
125
27%
Compilation Error because cube is already defined in the java.lang.Math class.
12%
Throws an ArithmeticException.
10%
Compilation Error or Runtime Error for some other reason.
You need to subscribe, in order to get notification for the next tutorials. and do comment if you have any suggession.
This our channel link
https://www.youtube.com/channel/UCKfVMZsEAJp8x2zLgM7ndiw
https://www.youtube.com/channel/UCKfVMZsEAJp8x2zLgM7ndiw
The account of the user that owns this channel has been inactive for the last 11 months. If it remains inactive in the next 9 days, that account will self-destruct and this channel may no longer have an owner.