Programming - Assertion
You Are Here :: Home > JAVA > Assertion - Jdbc
7.
For the javac compiler to accept code with assertions, use this ______________ option
A.
command-line
B.
argument
C.
prompt
D.
assertion
Answer: Option A
Explanation:
For the javac compiler to accept code with assertions, use this command-line option
8.
Assertions may slow down execution.why?
A.
Yes
B.
No
C.
cant say
D.
may be
Answer: Option A
Explanation:
For example, if an assertion checks to see if the element to be returned is the smallest element in the list, then the assertion would have to do the same amount of work that the method would have to do
9.
Assertions are, by default, _______________ at run-time
A.
disabled
B.
enabled
C.
both
D.
none
Answer: Option A
Explanation:
Assertions are, by default, disabled at run-time
10.
Enables or disables assertions in all classes except ________ classes
A.
static
B.
non static
C.
final
D.
system
Answer: Option D
Explanation:
Enables or disables assertions in all classes except system classes
11.
___________________ assertions in the named package and any subpackages
A.
Enables or disables
B.
Enables
C.
Disables
D.
none
Answer: Option A
Explanation:
Enables or disables assertions in the named package and any subpackages
12.
Enables or disables assertions in the _______________ package in the current working directory
A.
unnamed
B.
named
C.
languages
D.
Both B and C
Answer: Option A
Explanation:
Enables or disables assertions in the unnamed package in the current working directory
« prev
next »