📅  最后修改于: 2022-03-11 14:52:09.939000             🧑  作者: Mango
import java.util.Scanner;
public class FirstDuplicate
{
private static Scanner scanner = new Scanner(System.in);
public static void main(String[] args)
{
System.out.println("Enter random chars");
String s = new String(scanner.nextLine());
findTheFirstDublicate(s);
}
private static boolean findTheFirstDublicate(String s)
{
int[] arr = new int[26];
for(int i=0 ; i