Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package Lekcii;
- import java.util.Scanner;
- public class WordFilter {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- String[] words = scanner.nextLine().split("\\s+");
- scanner.close();
- for (String word : words) {
- if (word.length() % 2 == 0) {
- System.out.println(word);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement