package javaapplication1;
public class JavaApplication1 {
public static void main(String[] args) {
int n1 = 3, n2 = 9, n3 = 2;
int largest = max(max(n1, n2), n3);
System.out.format("The largest number is: %d\n", largest);
}
public static int max(int a, int b)
{
int big = a;
if (b > big) big = b;
return big;
}
}
/*
run:
The largest number is: 9
*/