fork download
  1. import java.io.*;
  2. import java.util.*;
  3.  
  4. @SuppressWarnings("unused")
  5. public class Main {
  6. public static void main(String[] args) throws IOException {
  7.  
  8. String[] validInputLine = inputValidator(br.readLine().split(" "));
  9. for ( String s : validInputLine) {
  10. System.out.println(s);
  11. }
  12. }
  13. static String[] inputValidator(String[] line) {
  14. for ( int i = 0; i < line.length; i++) {
  15. line[i].replaceAll("[^a-zA-Z]", "");
  16. line[i].toLowerCase();
  17. }
  18. return line;
  19. }
  20. }
  21.  
Success #stdin #stdout 0.03s 245632KB
stdin
A dog is an animal. Animals are not people.
stdout
A
dog
is
an
animal.
Animals
are
not
people.