Aliensbrain
  • Home
  • Topics
  • Quizzes
  • Notebooks
  • Community
  • Sign in
  • programming languages Online Quiz - 324
  • . Which line of the following code would make the test object...

. Which line of the following code would make the test object eligible for garbage collection? (Line numbers are included only for clarity's sake) 1. public class Garbage { 2. public static void main(String [] args) { 3. StringBuffer test = new StringBuffer("hello"); 4. System.out.println(test); 5. test = null; 6. } 7. }

technology programming languages
    1. 3
    1. 4
    1. 5
    1. No lines enable the garbage collection of the test object.

Show answer
Correct Option: C

Find more quizzes:

© Aliensbrain | all rights reserved
  • About
  • Contact
  • Terms and Condition
  • Privacy Policy