Two things: change the variables x , y , z as int and call the method as Math.max(Math.max(x,y),z) , since it takes only two parameters.
In the summary, change below:
String x = keyboard.nextLine(); String y = keyboard.nextLine(); String z = keyboard.nextLine(); int max = Math.max(x,y,z);
to
int x = keyboard.nextInt(); int y = keyboard.nextInt(); int z = keyboard.nextInt(); int max = Math.max(Math.max(x,y),z);
source share