// Math.max() works with only 2 parameters // If you want to check more parameters, you can nest the method int a = 10; int b = 20 int c = 30; return Math.max(a, Math.max(b,c));