📜  第一个没有重复的字符 - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:09.939000             🧑  作者: Mango

代码示例1
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