Java練習問題0 x 01
package java_001;
import java.util.*;
// , , , ,
// , , 。
// ascll 97-122
// ascll 65-90
public class Jav_001{
public static char nextChar() {
System.out.println(" :");
Scanner input = new Scanner(System.in);
String str=input.next();
input.close();
return str.charAt(0);
}
public static void main(String[] args) {
char ch=nextChar();
if(ch>='a'&&ch<='z'){
System.out.println(ch+" ");
ch=(char)(ch-32);
System.out.println(" :"+ch);
}
else{
System.out.println(ch+" ");
}
}
}