Write a java program to find largest number from four number

Here the program is to find the largest number among four numbers. For example we take four number 23,21,50,10 out of these number we have to find largest that is 50.



class findLargefour

{
     public static void main(String as[])
     {
    System.out.println("Enter first No:");
      int a=Integer.parseInt(as[0]);
    System.out.println("Enter Second No:");
      int b=Integer.parseInt(as[0]);
    System.out.println("Enter third No:");
      int c=Integer.parseInt(as[2]);
    System.out.println("Enter fourth No:");
      int d=Integer.parseInt(as[3]);
      int max=((a>b)&&(a>c)&&(a>d))?a:(((b>c)&&(b>d))?b:(c>d)?c:d);
    System.out.println("Largest No is :");
      System.out.println(max);
    }    
    }