-->
当前位置:首页 > 题库

单选题:What will be the result when you try to compile and run the foll

Luz5年前 (2021-05-10)题库1139
What will be the result when you try to compile and run the following code? @[C](2)

```Java
private class Base{
Base(){
int i = 100;
System.out.println(i);
}
}
public class PriBase extends Base{
static int i = 200;
public static void main(String argv[]){
PriBase p = new PriBase();
System.out.println(i);
}
}
```

A. Error at compile time
B. 200
C. 100 200
D. 100




A.Error at compile time
B.200
C.100 200
D.100


答案:C