private static void usingLastIndex(String[] args) { Scanner in = new Scanner(System.in); while (in.hasNextInt()) { int a = in.nextInt(); String str = Integer.toString(a); for (int i = str.length() - 1; i >= 0; i--) { if (str.lastIndexOf(str.charAt(i)) == i) { System.out.print(str.charAt(i)); } } ...