fork download
  1. public class Main {
  2. public static void main(String[] args) {
  3. System.out.println("Found " + args.length + " inputs.");
  4. int x = 0;
  5. for (String s : args) {
  6. x++;
  7. System.out.print("Input #" + x + ": ");
  8. Boolean found = false;
  9. String[] split = s.split("");
  10. String string = "";
  11. for (int i = 0; i < split.length; i++) {
  12. if (string.contains(split[i])) {
  13. System.out.print(split[i] + " found at indexes " + string.indexOf(split[i]) + " and " + i + "\n");
  14. found = true;
  15. break;
  16. } else {
  17. string += split[i];
  18. }
  19. }
  20. if (!found) {
  21. System.out.print("No recurring character found.\n");
  22. }
  23. }
  24. }
  25. }
Success #stdin #stdout 0.04s 4386816KB
stdin
IKEUNFUVFV
PXLJOUDJVZGQHLBHGXIW
*l1J?)yn%R[}9~1”=k7]9;0[$
stdout
Found 0 inputs.