Solution:
The solution of this question is
public static int max(int a, int b, int c)
{
return Math.max(Math.max(a,b),c);
}
or You can attempt this method
public static int max(int a, int b, int c) {
return a > b && a > c ? a : b > a && b > c ? b : c > a && c > a ? c : a;
}
or,
public int max (int aint, int bint, int cint){
return Math.max(aint, Math.max(bint, cint));
}
Hope this answer helpful to you.