I am trying following code
String s1 = \"ß.cfg\";
System.out.println (s.toUpperCase());
output I am getting is SS.CFG
since U
"ß" character is equivalent to "ss" (used in German, for example), and this is defined so in your Locale (the Locale you are using in your app).
You can try to do some experiment with a different Locale using method:
toUpperCase(Locale locale)
Edit: As the user said, this method is not valid, a possible workaroud (not very elegant) is:
String s1 = new String ("auß.cfg").replace('ß', '\u9999');
System.out.println (s1.toUpperCase(Locale.UK).replace('\u9999', 'ß'));