Question: uniqueChars is a method that you will code now, should be able to accept any string in the world and return unique characters from the
uniqueChars is a method that you will code now, should be able to accept any string in the world and return unique characters from the parameter.
Examples:
uniqueChars("java") ==> "jav"
uniqueChars("mama") ==> "ma"
uniqueChars("spoon") ==> "spon"
---------------------------
import java.util.*;
class Main { public static void main(String[] args) { //test your code Scanner scan = new Scanner(System.in); System.out.println("Enter string:"); String str = scan.next(); System.out.println( uniqueChars(str) ) ; } public static String uniqueChars(String str) { //write your below return null; } //uniqueChars method ends }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
