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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!