Advertisement
Strade351

Untitled

Feb 9th, 2017
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.51 KB | None | 0 0
  1. public class Demo {
  2.     public static void main(String[] args) {
  3.         String string = new String("Каложуев Иван Егорович " +
  4.                 "Иисусов Егор Иванович " +
  5.                 "Железная Анка Сергеевна");
  6.         String [] names = string.split(" ");
  7.         for (int i = 0; i < names.length; i++) {
  8.             if (names[i].equals("Иван")) {
  9.                 System.out.println("ЗДЕСЬ БЫЛ ИВАН");
  10.             }
  11.         }
  12.     }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement