We have sent an email with your new password.


java ch10

27 Questions  I  By Bing22
java ch10
Java ch10

  
Changes are done, please start the quiz.


Question Excerpt

Removing question excerpt is a premium feature

Upgrade and get a lot more done!
1.  10.1 Q1: Polymorphism enables you to:
A.
B.
C.
D.
2.  10.1 Q2: Which of the following statements about interfaces is false?
A.
B.
C.
D.
3.  10.2 Q1: For which of the following would polymorphism not provide a clean solution?
A.
B.
C.
D.
4.  10.2 Q2: Polymorphism allows for specifics to be dealt with during:
A.
B.
C.
D.
5.  10.3 Q1: Which statement best describes the relationship between superclass and subclass types?
A.
B.
C.
D.
6.  10.4 Q1: A(n)          class cannot be instantiated.
A.
B.
C.
D.
7.  10.4 Q2: Non-abstract classes are called:
A.
B.
C.
D.
8.  10.5 Q1: It is a UML convention to denote the name of an abstract class in:
A.
B.
C.
D.
9.  10.5 Q2: If the superclass contains only abstract method declarations, the superclass is used for:
A.
B.
C.
D.
10.  10.5.1 Q1: Which of the following could be used to declare abstract method method1 in abstract class Class1 (method1 returns an int and takes no arguments)?
A.
B.
C.
D.
11.  10.5.1 Q2: Which of the following statements about abstract superclasses is true?
A.
B.
C.
D.
12.  Consider the abstract superclass below:public abstract class Foo{   private int a;   public int b;   public Foo( int aVal, int bVal )   {      a = aVal;      b = bVal;   } // end Foo constructor   public abstract int calculate();} // end class FooAny concrete subclass that extends class Foo:
A.
B.
C.
D.
13.  10.5.5 Q1: Consider classes A, B and C, where A is an abstract superclass, B is a concrete class that inherits from A and C is a concrete class that inherits from B. Class A declares abstract method originalMethod, implemented in class B. Which of the following statements is true of class C?
A.
B.
C.
D.
14.  10.5.6 Q1: When a superclass variable refers to a subclass object and a method is called on that object, the proper implementation is determined at execution time. What is the process of determining the correct method to call?
A.
B.
C.
D.
15.  10.5.6 Q2: Every object in Java knows its own class and can access this information through method         .
A.
B.
C.
D.
16.  10.5.7 Q1: Assigning a subclass reference to a superclass variable is safe:
A.
B.
C.
D.
17.  10.6 Q1: Classes and methods are declared final for all but the following reasons:
A.
B.
C.
D.
18.  10.6 Q2: All of the following methods are implicitly final except:
A.
B.
C.
D.
19.  10.6 Q3: Declaring a method final means:
A.
B.
C.
D.
20.  10.7 Q1: An interface may contain:
A.
B.
C.
D.
21.  Which of the following does not complete the sentence correctly?An interface         .
A.
B.
C.
D.
22.  10.7.1 Q1: The UML distinguishes an interface from other classes by placing the word “interface” in          above the interface name.
A.
B.
C.
D.
23.  10.7.2 Q1: Interfaces can have          methods.
A.
B.
C.
D.
24.  10.7.3 Q1: Which keyword is used to specify that a class will define the methods of an interface?
A.
B.
C.
D.
25.  10.7.3 Q2: Which of the following is not possible?
A.
B.
C.
D.
26.  10.7.4 Q1: A class that implements an interface but does not declare all of the interface’s methods must be declared:
A.
B.
C.
D.
27.  10.7.7 Q1: Constants declared in an interface are implicitly         .
A.
B.
C.
D.
Back to top

Removing ad is a premium feature

Upgrade and get a lot more done!
Take Another Quiz