Hi, how do I sort the string in alphabetical order?

find most occuring character("blablabla")
remove most occuring("aaa")
input: blablabla
output: "aaa"

Hints:

The String class has a method to convert into an array of chars
The Arrays class has a method to sort arrays of chars
The String class has a constructor that takes an array of chars to create a new String.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.