ADP interview question

One of the technical questions during the coding exercise involved writing logic in Java using string functions. For example, I was asked to solve a problem like: "Given a string, return the first non-repeating character. If all characters repeat, return -1." This question tested both my understanding of Java string manipulation and my approach to efficient problem solving