•class Strings {
• public static void main
(String[] arguments) {
• int length = arguments.length;
• if (length > 0)
{
•
System.out.println(" you entered following words :");
• int max =
0;
• for(int l =
0; l < length; l++) {
•
System.out.println(arguments[l].toUpperCase());
•
if(arguments[l].length() > max) max = arguments[l].length();
•
if(arguments[l].equals("stop")) break;
• }
•
System.out.println("Longest word : "+ max + " characters
");
• }
• else System.out.println("use: 'java Strings
[string]'");
• }
•}