import java.applet.Applet;import java.io.*;public class FindSort{public static void main(String srgs[])throws IOException{BufferedInputStream in=new BufferedInputStream(System.in);BufferedOutputStream out=new BufferedOutputStream(System.out);int y[]={2,4,5,7,9,0};int a;byte b[]=new byte[2];System.out.println("请输入所要查找的数字:");a=in.read(b,0,2);int l=0;for(int i=0;i<6;i++){if(y[i]==a)l=i;break;}if(l==0){out.write(b,0,1);System.out.println("没有找到!");out.flush();}elseSystem.out.println("找到!");}}
引用第1楼zc1984于2006-10-29 12:18发表的:前几行都是用来获取键盘输入和输出的哈
引用第5楼hcz992于2006-10-29 12:52发表的:请你查看API文档资料,在那里会给你详细的描述说明.