更多java基础知识试题
- 1以下是文件HELLO.java中的源代码,请分析该代码的运行结果public class Hello{public static void main(String[] args){String str = "Hello World";System.out.print(str);}}
- 2以下输出是什么 ?class LowHighSwap{ static void doIt( int[] z ) { int temp = z[z.length-1]; z[z.length-1] = z[0]; z[0] = temp; }}class TestIt{ public static void main( String[] args ) { int[] myArray = {1, 2, 3, 4, 5}; LowHighSwap.doIt(myArray); for (int i = 0; i < myArray.length; i++) { System.out.print(myArray[i] + " "); } }}
- 3接口Statement中定义的execute方法的返回类型所代表的含义是:( )
- 4File类中的哪个方法可以获得文件或目录的名称?
- 5在Java中,负责对class文件解释执行的是( )