判定函数f(x)=x+sinx(0≤x≤2π)的单调性.
第1题
A.可以编译通过
B.不能编译通过
第2题
class A { private int secret = 5; } public class Test1 { public static void main(String[] args) { A a = new A(); System.out.println(a.secret++); } } 程序不能编译通过,因为在类A中的成员变量secret用private修饰,所以在类Test1中无法访问。
第4题
试图编译和运行以下代码的结果是什么? 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、编译错误
B、200
C、100 200
D、100
第5题
A.由于在main中访问了Test的私有的变量而不能编译
B.由于成员变量定义初始化时的顺序错误而不能编译
C.通过编译,打印出0
D.通过编译,打印出10
第6题
给定以下代码, class Node <t> implements Comparable <t> { public int compareTo(T obj) { /* ... */ } // ... } 那以下代码可以编译通过。 Node <string> node = new Node<>(); Comparable <string> comp = node;
第7题
public MyNumber(int num) { this.num = num;}public int getNum(){ return num;}public void setNum(int num) { this.num = num;}public stati
A.5, 20
B.5, 10
C.20, 20
D.编译不通过
第8题
第9题
2、分析下列代码段?()。class Program { static void Main(string[] args) { test t = new test(); Console.WriteLine(t.returnInt()); } } class test { private int z; private int returnInt() { return z; } } 上述代码运行后变量返回的结果是什么?()
A、0
B、NULL
C、Undefined
D、无法编译通过
为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!