编译JavaApplication源程序文件将产生相应的字节码文件 这些字节码文件的扩展名为()
A. .java
B. .class
C. .obj
D. .jdk
查看答案
将1赋值给变量x,代码为()
A. 1 = x;
B. x = 1;
C. x := 1;
D. x == 1;
以下程序会抛出哪种异常?() publicclassTest{ public static void main(String[] args) { System.out.println(1 / 0); } }
ArithmeticException
B. ArrayIndexOutOfBoundsException
C. StringIndexOutOfBoundsException
D. ClassCastException
E. No exception
下列哪项是在抽象类中声明抽象方法?()
A. public abstract method();
B. public abstract void method();
C. public void abstract Method();
D. public abstract void method() {}
import java.io.*;public class Prog1{ public static void main(String args[]) throws IOException { int i,L; String s; StringBuffer dest; BufferedReader buf; buf=new BufferedReader(new InputStreamReader(System.in)); s=buf.readLine(); L=s.______ ; dest=new StringBuffer(L); /*****************SPACE*****************/ for( i=L-1;______ ;i--) dest.append(s.______ ); System.out.println(dest.______ ); } }