Difference between system.gc() and runtime.gc()

前端 未结 7 886
谎友^
谎友^ 2020-12-12 19:15

What is the difference between System.gc() and Runtime.gc()?

7条回答
  •  清歌不尽
    2020-12-12 19:29

    In the runtime system the gc is instance method but in system method the gc is static .

    because of this reason we prefer to use system.gc().

提交回复
热议问题