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

多项选择题

1. public class Test { 
2. public  T findLarger(T x, T y) { 
3. if(x.compareTo(y) > 0) { 
4. return x; 
5. } else { 
6. return y; 
7. } 
8. } 
9. } 
and: 
22. Test t = new Test(); 
23. // insert code here 
Which two will compile without errors when inserted at line 23?()

 

    A. Object x = t.findLarger(123, “456”);
    B. int x = t.findLarger(123, new Double(456));
    C. int x = t.findLarger(123, new Integer(456));
    D. int x = (int) t.findLarger(new Double(123), new Double(456));

点击查看答案&解析

相关考题

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

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

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

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