📜  在 Java 代码示例中查找双字母序列单词

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

代码示例1
System.out.print("Double Letter Sequence Words are: ");
for(int i = 0; i < words.length; i++) {
    String temp = words[i];
    for(int j = 0; j < temp.length() - 1; j++) {
        if(temp.charAt(j) == temp.charAt(j + 1))
            System.out.print(temp + " ");
    }
}