Display Unique Characters from Input String
Single File Programming Question
Problem Statement
Ashok needs to implement a program using the java.lang package to process a given string. The goal is to create a program that extracts and displays a new string containing only the unique characters from the provided input string.
Ashok should efficiently use the java.lang.StringBuilder class and display the output. Help him to complete the program.
Input:
format :The input consists of a string.
Output:
format :The output prints a string representing the modified string containing the unique characters from the provided input string.
Refer to the sample output for formatting specifications.
Code constraints : 1 ≤ Length of String ≤ 50
The string contains spaces, lowercase and uppercase letters.
The string characters are case-sensitive.
Sample test cases :
Input 1:
ProgramMing
Output 1 :
ProgamMin
Input 2 :
Playing is fun
Output 2 :
Playing sfu