1.Which two demonstrate an “is a” relationship? (Choose Two)
A. public interface Person { }
public class Employee extends Person { }
B. public interface Shape { }
public class Employee extends Sha pe { }
C. public interface Color { }
public class Employee extends Color { }
D. public class Species { }
public class Animal{private Species species;}
E. interface Component { }
Class Container implements Component (
Private Component[ ] children;
Answer :de
2. Given:
1. package foo;
2.
3. public class Outer (
4. public static class Inner (
5. )
6. )
Which statement is true?
A. An instance of the Inner class can be constructed with “new Outer.Inner ()”
B. An instance of the inner class cannot be constructed outside of package foo
C. An instance of the inner class can only be constructed from within the outer class
D. From within the package bar, an instance of the inner class can be constructed with “new inner()”
Answer:c
3.Exhibit:
1 public class enclosinggone{
2 public class insideone{}
3 }
最后
以上就是标致白昼最近收集整理的关于java英文试题_Java试题及答案英文版的全部内容,更多相关java英文试题_Java试题及答案英文版内容请搜索靠谱客的其他文章。
发表评论 取消回复