Advertisement
WoofwoofWolf

Untitled

Aug 28th, 2015
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.58 KB | None | 0 0
  1. public class d {
  2.     public static void main(String[] args) throws Exception
  3.     {
  4.         BufferedReader reader= new BufferedReader(new InputStreamReader(System.in));
  5.         ArrayList<String> s = new ArrayList<String>();
  6.         s.add(0,reader.readLine());
  7.         String max=null;
  8.         for(int i=1;i<=4;i++)
  9. {
  10.             s.add(i,reader.readLine());
  11.             if (s.get(i-1).length() >s.get(i).length()){
  12.                 s.set(0, s.get(i));
  13.                
  14.                
  15.            }
  16.            
  17.             }
  18.  
  19.        
  20.         System.out.print(s.get(0));
  21.        }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement