Pages

Tuesday, July 3, 2012

program to accept three command line arguments from the user and to display it in sorted order

Write a program to accept three command line arguments from the user and to display it in sorted order.



import java.util.Arrays;



class sorting

{

public static void main(String args[])

{

if (args.length>0)

{

Arrays.sort(args);

System.out.println("");

for(int i=0;i
{

System.out.println(args[i]);

}

}

}

}

No comments:

Post a Comment