单项选择题

下列会出错的代码是______。
(1) public void modify( )
(2) int I,j,k;
(3) i=100;
(4) while(i>0)
(5) j=i*2;
(6) System.out.println("The value of j is"+j);
(7) k=k+1;
(8)
(9) i--;
(10)

A.第4行
B.第6行
C.第7行
D.第8行
<上一题 目录 下一题>
热门 试题

单项选择题
下面程序实现对zip文件file.zip的查询,在横线处填上正确的语句______。 package test; import java.io.*; import java.util.*; import java.util.zip.*; public class Exam public static void main(String[ ]args) try FileInputStream fis=new FileInputStream( test file.zip ); ZipInputStream zis=new ZipInputStream(fis); ZipEntry en; while((______)!=null) en.getName( ); zis.closeEntry( ); Zis.close( ); catch(Exception e)e.printStackTrace( );
A.en=zis.getNextEntry( )
B.en==zis.getNextEntry( )
C.en=zis.getEntry( )
D.zis.getNextEntry( )
单项选择题
下面程序段的输出结果是______。 public class Test public static void main(String args[ ]) int x,y; x=(int)Math.sqrt(5 2)+(int)Math.random( )*5 2; y=(int)Math.sqrt(3 2)+(int)Math.random( )*3 2; if(x>y) System.out.println( x>y ); else if(x==y) System.out.println( x=y ); else System.out.println( x<y );
A.x>y
B.x=y
C.x<y
D.编译错误
相关试题
  • 下面程序中,若从键盘输入大写字母C,则程...