getting correct output 'e' is first repetitive character .... Optional firstRepeatChar = charCount.entrySet().stream().filter((e->e.getValue()>1)).map(e->e.getKey()).findFirst(); System.out.println("first repeat char: "+firstRepeatChar.orElse(null)); // e= first repeated character
If u would have explained the code that will be very helpful, you are just writing the code
Confusing code 😞.
String input = "Hello Welcome"; can you try the input for above program its giving first repeated character coming wrong
getting correct output 'e' is first repetitive character .... Optional firstRepeatChar = charCount.entrySet().stream().filter((e->e.getValue()>1)).map(e->e.getKey()).findFirst();
System.out.println("first repeat char: "+firstRepeatChar.orElse(null)); // e= first repeated character
bro If had exam can I drop a message for you
no