网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
单选题
You want subclasses in any package to have access to members of a superclass. Which is the most restrictive access modifier that will accomplish this objective?()
A
Public
B
Private
C
Protected
D
Transient
E
No access modifier is qualified.
参考答案
参考解析
解析:
暂无解析
更多 “单选题You want subclasses in any package to have access to members of a superclass. Which is the most restrictive access modifier that will accomplish this objective?()A PublicB PrivateC ProtectedD TransientE No access modifier is qualified.” 相关考题
考题
单选题Which statement is true for the class java.util.ArrayList?()A
The elements in the collection are ordered.B
The collection is guaranteed to be immutable.C
The elements in the collection are guaranteed to be unique.D
The elements in the collection are accessed using a unique key.E
The elements in the collections are guaranteed to be synchronized.
考题
单选题10. interface Foo {} 11. class Alpha implements Foo {} 12. class Beta extends Alpha {} 13. class Delta extends Beta { 14. public static void main( String[] args) { 15. Beta x = new Beta(); 16. // insert code here 17. } 18. } Which code, inserted at line 16, will cause a java.lang.ClassCastException?()A
Alpha a = x;B
Foo f= (Delta)x;C
Foo f= (Alpha)x;D
Beta b = (Beta)(Alpha)x;
考题
单选题Which Man class properly represents the relationship “Man has a best friend who is a Dog”?()A
class Man extends Dog { }B
class Man implements Dog { }C
class Man { private BestFriend dog; }D
class Man { private Dog bestFriend; }E
class Man { private Dog }F
class Man { private BestFriend }
考题
单选题Which interface does java.util.Hashable implement?()A
Java.util.Map.B
Java.util.List.C
Java.util.Hashable.D
Java.util.Collection.
考题
单选题public static Iterator reverse(List list) { Collections.reverse(list); return list.iterator(); } public static void main(String[] args) { List list = new ArrayList(); list.add(” 1”); list.add(”2”); list.add(”3”); for (Object obj: reverse(list)) System.out.print(obj + “,”); } What is the result?()A
3,2,1,B
1,2,3,C
Compilation fails.D
The code runs with no output.E
An exception is thrown at runtime.
热门标签
最新试卷