Computer Science, asked by Satyasen, 1 month ago

take two char alpha as input print them in ascending order in the following way

WRITE THE JAVE COMMAND STEPS TO GET THE FOLLOWING ANSWER

g
u
a

a
g
u​

Answers

Answered by Anonymous
0

Explanation:

Sort a String in Java (2 different ways)

String class doesn’t have any method that directly sorts a string, but we can sort a string by applying other methods one after other. String is a sequence of characters. In java, objects of String are immutable which means a constant and cannot be changed once created.

Creating a String

There are two ways to create a string in Java:

String literal

String s = “GeeksforGeeks”;

Using new keyword

String s = new String (“GeeksforGeeks”);

Answered by armaanshaikh98346813
0

Answer:

order in the following way

Similar questions