The program seems to work. It will replace duplicates with null. Unless it refers to itself, then it continues. If I use Scanner.nextLine, it will end and display my results once I enter the 4th word, "Java". The only way I can enter more words is if I put something below it like a System.out.println(). Why is this? If I use Scanner.next() it works perfectly, but the checker won't take that. Seems like a bug.