A.
Option A
B.
Option B
C.
Option C
D.
Option D
Option B
Given:
What is the result?
A.
Compilation fails
B.
The code compiles, but does not execute.
C.
Paildrome
D.
Wow
E.
Mom
The code compiles, but does not execute.
Given:
Which constructor initializes the variable x3?
A.
Only the default constructor of class X
B.
Only the no-argument constructor of class Y
C.
Only the no-argument constructor of class Z
D.
Only the default constructor of object class
Only the no-argument constructor of class Z
Given the following class:
And given the following main method, located in another class:
Which three lines, when inserted independently at line n1, cause the program to print a o
balance?
A.
this.amount = 0;
B.
amount = 0;
C.
acct (0) ;
D.
acct.amount = 0;
E.
acct. getAmount () = 0;
F.
acct.changeAmount(0);
G.
acct.changeAmount(-acct.amount);
H.
acct.changeAmount(-acct.getAmount());
acct.amount = 0;
acct.changeAmount(-acct.amount);
acct.changeAmount(-acct.getAmount());
Given:
What is the result?
A.
C B A
B.
C
C.
A B C
D.
Compilation fails at line n1 and line n2
A B C
Page 4 out of 48 Pages |
Previous |