好心是朋友指教
import java.util.*;
import java.io.*;
public class king202
{
public static void main(String [] args)
{
String x;
int sear,num;
int king[ ] ={22,83,17,12,35,15,64,49,9,42};
BufferedReader keyin=new
BufferedReader(new InputStreamReader(System.in));
System.out.println("已经排序完成的数组:");
Arrays.sort(king);
for (int n=0;n<king.length;n++)
System.out.println(king[n]+" ");
System.out.println();
System.out.print("输入欲查找的数字:");
x=keyin.readLing();
sear=Integer.parseInt(x);
num=Arrays.binarySearch(king.sear);
if (num>=0);
System.out.println("数字"+sear+"在数组索引为 " +num+"处");
else
System.out.println("没有找到数字"+sear);
}
}
编译时出现 : king202.java :25: 'else' witout 'of'
else
^
1 error
可以告诉我是怎么回事吗? 谢了!!!!!!