Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.*;
- import java.util.*;
- public class PC {
- public static void main(String[] args) throws FileNotFoundException {
- Scanner io = new Scanner(new File("src/t.txt"));
- int word=0;
- String x ="";
- while(io.hasNext())
- {
- String lo = io.next();
- if(lo.equals("E-N-D"))
- break;
- if(word<lo.length())
- {
- word = lo.length();
- x = lo;
- }
- }
- System.out.print(x.toLowerCase());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement