wslss007
发贴: 35
积分: 0
|
于 2005-10-17 20:51
public class THE { public static void main(String args[]) { String str1,str2; BufferedReader buffer1; buffer1=new BufferedReader(new InputStreamReader(System.in)); System.out.print("请输入紫外线指数"); str1=buffer1.readLine(); int x=Integer.parseInt(str1); switch(x){ case 0: case 1: case 2: case 3: case 4: str2="微量级"; break; default: str2="危险级"; } System.out.println("级数"=+x+"为"+str2); } }
其中buffer1=new BufferedReader(new InputStreamReader(System.in));这个语句不明白什么意思,还有这个程序编译时有四个错误,请改正,谢谢。
bluecrystal edited on 2005-10-17 20:54
|