Write a program to arrange the characters in the given string such that the capitals are placed first followed by small letters, followed by sum of all the numbers finally followed by special characters. Please see the requirements for better clarification.
Input (String) | Output (String) |
---|---|
CAE2W3@D# | ACDEW5#@ |
HWA5F7&1# | AFHW13#& |
AbCdd12/ | ACbdd3/ |
LA$DA8%6 | AADL14$% |
55UY#I*AI%% | AIIUY10#%%* |
&&&8789 | 32&&& |
class ArrangeCharacters
{ public static void main(String s[])
{
String input = "8La&D9u#";
System.out.println("After arranging: " + arrangeCharacters(input));
}
public static String arrangeCharacters(String input) {
//Write code here to arrange characters of given string
}
}
Topic: Unknown