欢迎来到求知题库网 求知题库官网
logo
全部科目 > Java认证考试 > SCJP程序员认证考试

单项选择题

public class test( 
public int aMethod()[ 
static int i=0; 
i++; 
return I; 
) 
public static void main (String args[]){ 
test test = new test(); 
test.aMethod(); 
int j = test.aMethod(); 
System.out.printIn(j); 
] 
}       
What is the result?()  

    A. Compilation will fail.
    B. Compilation will succeed and the program will print “0”
    C. Compilation will succeed and the program will print “1”
    D. Compilation will succeed and the program will print “2”

点击查看答案&解析

相关考题

微信小程序免费搜题
微信扫一扫,加关注免费搜题

微信扫一扫,加关注免费搜题

微信扫一扫,加关注免费搜题

微信扫一扫,加关注免费搜题