Java Program Find Largest Number Among Three

Write a Java program to find largest number among three.



Source Code
public class LargestAmongThree {

	public static void main(String[] args) {
		int x = 10, y = 15, z = 12;
		System.out.print("Largest number among three is : ");
		if(x > y) {
			if(x > z) {
				System.out.print(x);
			}
			else {
				System.out.print(z);
			}
		}
		else {
			if(y > z) {
				System.out.print(y);
			}
			else
			{
				System.out.print(z);
			}
		}
	}
}
Output
Largest number among three is : 15