Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for (int i = 0; i < 3; i++) {
- System.out.println("Ingrese palabra " + (i + 1) + ":");
- op = tec.readLine();
- char[] chars = op.toCharArray();
- for (char c : chars) {
- if (!Character.isLetter(c)) {
- System.out.println("Palabra no puede contener numeros");
- } else {
- if ((int) op.length() != (int) lista1.get(i)) {
- System.out.println("Ingresa la plabra correcta");
- i--;
- } else {
- lista2.add(op);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement