Advertisement
Guest User

Untitled

a guest
Apr 24th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.62 KB | None | 0 0
  1. Scanner fromKey = new Scanner(System.in);
  2.  
  3.         List<String> lista = new ArrayList<String>();
  4.  
  5.         System.out.println("Unesite rečenicu:");
  6.         do {
  7.             String nekiString=fromKey.next();
  8.             int i=0;
  9.             lista.add(String.valueOf(nekiString.charAt(i)));
  10.             i++;
  11.         } while (System.in.equals("end") || System.in.equals("END"));
  12.  
  13.         int counter=0;
  14.         if (fromKey.next().equals("end") || fromKey.next().equals("END")) {
  15.             for (int i = 0; i < lista.size(); i++) {
  16.                 System.out.println(lista.get(i)"");
  17.  
  18.             }
  19.         }
  20.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement