Java Program to Print non Repeating Characters in String

In this tutorial, we will learn java program to print all characters of the string which are not repeating.

Take any string as an input from the user and check if any character in the string is repeating or not if it is not repeating then print that character as output.

For example

Case1: If the user inputs the string ‘javaprogramming’

Then the output should be ‘javprogming’, where there is no character that is repeating.

Case2: If the user inputs the string ‘quescoll’

Then the output should be ‘quescol’, where there is no character that is repeating.

Java Program to Print non repeating Characters in String

Output

print non repeating character java

Explanation:

For the input string ‘Quescol Website’, as the characters ‘e’, and ‘s’,are repeating but ‘Q’, ‘W’, ‘b’, ‘c’, ‘i’, ‘l’, ‘o’, ‘t’  and ‘u’ are not repeating.