class Testing {
public static void main(String[] args) {
char c1 = 'a', c2;
c2 = (char) ( c1 - ('a' - 'A'));
String s1 = "abc", s2 = "";
for (int i=0; i<s1.length(); i++) {
s2 = s2 + (char) ( s1.charAt(i) - ('a' - 'A') );
}
System.out.println( c2 + " " + s2);
}
}
----------
do add other code to check that the char you are converting
is between 'a' to 'z'.