Moderate

In java, gc() method is available in which package ?

Correct answer: B. java.lang package

  • A. java.io package
  • B. java.lang package
  • C. java.awt package
  • D. java.util package

Explanation

`gc()` is associated with `System.gc()`, and the `System` class belongs to the `java.lang` package, which Java imports automatically.

Last updated

Practise Software Design and Architecture

493 free Software Design and Architecture MCQs from Software Engineering, each with the correct answer and an explanation. Unlimited attempts, no account needed.

Exams that ask Software Engineering questions like this

Software Engineering is on this paper prepared for on TestUstad, and all of them draw the same bank, so this question is worth knowing for it.

Related questions