public class Test8 {
public static void main(String[] args) throws Exception
{
System.out.println("请输入字符串:");
//读取键盘录入
BufferedReader in
= new BufferedReader(new InputStreamReader(System.in));
//将录入数据转成字符串
String str=in.readLine();
byte[] buf=str.getBytes();
//通过遍历的方式判断每一位是否字母,是的话,通过+-32来切换大小写
for (int x = 0;x<buf.length;x++)
{