Advanced Java Programming Quiz

Casual Mode - Take your time!

1 / 20
Correct
0
Incorrect
0
Score
0%
Multiple Choice

Given: class CardBoard { Short story = 5; CardBoard go(CardBoard cb) { cb = null; return cb; } public static void main(String[] args) { CardBoard c1 = new CardBoard(); CardBoard c2 = new CardBoard(); CardBoard c3 = c1.go(c2); c1 = null; // do Stuff } } When // doStuff is reached, how many objects are eligible for GC?

  1. 0
  2. 1
  3. 2
  4. Compilation fails
  5. It is not possible to know
  6. An exception is thrown at runtime
Change Mode