Question
Option 4 : It only suggests garbage collection; the JVM may ignore it / यह केवल garbage collection का सुझाव देता है; JVM इसे नज़रअंदाज़ कर सकता है
Detailed Solution
सही उत्तर It only suggests garbage collection; the JVM may ignore it / यह केवल garbage collection का सुझाव देता है; JVM इसे नज़रअंदाज़ कर सकता है है।
Question:
Which statement about Java's `System.gc()` is TRUE? / Java के `System.gc()` के बारे में कौन-सा कथन सत्य है?
Correct Answer: It only suggests garbage collection; the JVM may ignore it / यह केवल garbage collection का सुझाव देता है; JVM इसे नज़रअंदाज़ कर सकता है
`System.gc()` is a hint to the JVM, which is free to ignore it — there is no guarantee that any collection runs, let alone synchronously. The trap is treating it as a deterministic "collect now" command. / `System.gc()` JVM को एक सुझाव है, जिसे वह नज़रअंदाज़ कर सकता है — इस बात की कोई गारंटी नहीं कि कोई collection चलेगा, saath ही synchronous तो बिल्कुल नहीं। जाल इसे नियतात्मक "अभी collect करो" कमांड समझना है।