Runtime class
Garbage collection frees heap objects that nothing points to anymore. You don’t call free() like C++. The JVM decides when to collect.
You can hint with System.gc() but you cannot force it. Unreachable objects become eligible. Memory leaks still happen if you keep unwanted references (static lists, caches).
Don’t say “Java has no memory problems”. GC helps, it does not make leaks impossible.
Let's take this on the board with one tiny Main class — no extra files. Output: Asha scored 72 then Pass. Real Main. Swap marks/name to show one idea from Runtime class. Start from main, go line by line, and stop at each print. That output is the proof for Runtime class.
Explain Runtime class as: definition → why → one code idea.