Programming - Assertion
You Are Here :: Home > JAVA > Assertion - Jdbc
1.
An _________________ is a statement in Java that enables you to test your assumptions about your program.
A.
assertion
B.
negation
C.
static
D.
instance
Answer: Option A
Explanation:
An assertion is a statement in Java that enables you to test your assumptions about your program.
2.
Each _____________ contains a boolean expression that you believe will be true when the assertion executes.
A.
assertion
B.
negation
C.
static
D.
instance
Answer: Option A
Explanation:
An assertion is a statement in Java that enables you to test your assumptions about your program.Each assertion contains a boolean expression that you believe will be true when the assertion executes.
3.
Assert ________________ as requirement of client
A.
precondition
B.
postcondition
C.
increment
D.
decrement
Answer: Option A
Explanation:
Assert precondition as requirement of client
4.
Assert ________________ as effect of client method
A.
precondition
B.
postcondition
C.
increment
D.
decrement
Answer: Option B
Explanation:
Assert postcondition as effect of client method
5.
Don’t use assertions to flag user errors—why not?
Answer: Option
Explanation:
6.
____________ are labeled in stack trace with the file and line number from which they were thrown
A.
Assertion failures
B.
negation
C.
static
D.
instance
Answer: Option A
Explanation:
Assertion Failures are labeled in stack trace with the file and line number from which they were thrown
next »