Answer:
The command i will use in carrying out such function is
Explanation;
Kindly check the attached file for the command as it can not be written fully in the answer box.
The code that examines all the strings in the input source and determines how long the longest string (or strings are) is the following:
total = 0;
% initial value is zero, in every while loop it will be incremented
while(input.hasNextInt()){
total += input.nextInt( );
}