QUESTIONS | WITH COMPLETE
SOLUTIONS!!
1 of 108
Term
What will happen if the BankAccount class does NOT have a default
constructor written, the CheckingAccount does have a default constructor
and main( ) tries to create an instance like this:
CheckingAccount cA = new ChekingAccount( );
Give this one a try later!
, All fields in the default All fields in the default
CheckingAccount will be CheckingAccount will be
set to null. left undefined.
All fields in the default All fields in the default
CheckingAccount will be set CheckingAccount will be set to
to zero. random values.
Don't know?
2 of 108
Term
Write the command to run a class file named Book.class
Give this one a try later!
javac Book.java java Book
null Object Class
Don't know?
, 3 of 108
Term
What is an interface comprised of in Java 7?
Give this one a try later!
method heading package
primitive and reference method initializer
Don't know?
4 of 108
Term
Does the is-a relationship apply to classes that implement
an interface?
Give this one a try later!
for(i =0; i<array.length -1; i++)
{
Throwabl
e System.out.println(array[i]);
}
No Yes
, Don't know?
5 of 108
Term
T/F If a method throws an Exception and the Exception is
caught in a catch block, the method continues executing
the code after the catch block.
Give this one a try later!
False private
yes True
Don't know?
6 of 108
Term
If price has a value of 25, what is the value of discount after
this statement? discount = price < 25? .10: .20;
Give this one a try later!
True .2