Programming - Assertion
You Are Here :: Home > JAVA > Assertion - Jdbc
19. |
we can use ______________ to guarantee the behavior.
|
A. |
inheritance |
B.
|
assertions |
C.
|
polymorphism
|
D.
|
abstraction
|
|
Answer: Option B
Explanation:
we can used assertions to guarantee the behavior. |
|
20. |
If a program should never reach a point,then a ___________________ false assertion may be used
|
A. |
constant |
B.
|
single |
C.
|
doubled
|
D.
|
multiple
|
|
Answer: Option A
Explanation:
If a program should never reach a point,then a constant false assertion may be used |
|
21. |
How many types of Assertions?
|
|
Answer: Option C
Explanation:
Assertions are of two types:1) Preconditions2) Postconditions. |
|
22. |
__________ ensures the program validity by catching exceptions and logical errors.
|
A. |
encapsulation |
B.
|
assertions |
C.
|
inheritance
|
D.
|
polymorphism
|
|
Answer: Option B
Explanation:
Assertions ensures the program validity by catching exceptions and logical errors. |
|
23. |
___________________ are the assertions which invokes when a method is invoked
|
A. |
Preconditions |
B.
|
postcondition |
C.
|
both A and B
|
D.
|
none of these
|
|
Answer: Option A
Explanation:
Precondition are the assertions which invokes when a method is invoked |
|
24. |
____________________ are the assertions which invokes after a method finishes.
|
A. |
Preconditions |
B.
|
postcondition |
C.
|
both A and B
|
D.
|
none of these
|
|
Answer: Option B
Explanation:
Post Condition are the assertions which invokes after a method finishes. |
|
« prev
next »