相关试题
单选题 下列程序段执行后的结果是( )。
Str.charAt(i)的意思是第i个字符在字符串str中所占的位置
Length()
返回字符串的长度
String s = new String("abcdefg");
For (int i=0; i<s.length(); i+=2){//i第一次输出的值是0
System.out.print(s.charAt(i));}
单选题 设 x = 1 , y = 2 , z = 3,则表达式 y+=z--/++x 的值是( )。
单选题 下列哪一个import命令可以使我们在程序中创建输入/输出流对象( )。
单选题 如下哪个是合法的Java中的标识符( )。
单选题 下面的代码段执行之后count的值是什么( )。
Int count = 1;
For (int i = 1; i <= 5; i++) {//第一次i出去是1
Count += i;}
System.out.println(count);
单选题 为AB类的一个无形式参数无返回值的方法method书写方法头,使得使用类名AB作为前缀就可以调用它,该方法头的形式为( )。
单选题 Java“一次编译,随处运行”的特点在于其( )
单选题 给定java 代码如下,编译运行后,输出结果是( )。
Public class test {
Static int i;
Public int aMethod() {
i++;
return i;
}
Public static void main (String args[]) {
Test test=new Test() ;
test.aMethod () ;
System.out.println (test.aMethod()) ;
} }