Java garbage collection Interview questions.

What are the garbage collectors in java?

As of java 11 we have 5 types of garbage collectors, they are as below.

  • Serial Garbage Collector
  • Parallel Garbage Collector
  • Concurrent Mark Sweep Garbage Collector(CMS)
  • G1 garbage Collector
  • Z Garbage Collector
  • To verify which GC is currently used ypu can use below command:
    java -XX:+PrintCommandLineFlags -version

    Newest
    Previous
    Next Post »

    1 comments:

    Click here for comments
    12 January 2022 at 13:00 ×

    Hire Java DevelopersProgrammers in India from Keen Solution.

    Congrats bro Keen Solution you got PERTAMAX...! hehehehe...
    Reply
    avatar

    Pages