Skip to content

Commit 0887649

Browse files
committed
Update README.md
1 parent 5d46b29 commit 0887649

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2362,13 +2362,13 @@ You shouldn\'t divide number by zero
23622362
23632363
## Q. The difference between Serial and Parallel Garbage Collector?
23642364
2365-
**Serial Garbage Collector**
2365+
**1. Serial Garbage Collector:**
23662366
23672367
Serial garbage collector works by holding all the application threads. It is designed for the single-threaded environments. It uses just a single thread for garbage collection. The way it works by freezing all the application threads while doing garbage collection may not be suitable for a server environment. It is best suited for simple command-line programs.
23682368
23692369
Turn on the `-XX:+UseSerialGC` JVM argument to use the serial garbage collector.
23702370
2371-
**Parallel Garbage Collector**
2371+
**2. Parallel Garbage Collector:**
23722372
23732373
Parallel garbage collector is also called as throughput collector. It is the default garbage collector of the JVM. Unlike serial garbage collector, this uses multiple threads for garbage collection. Similar to serial garbage collector this also freezes all the application threads while performing garbage collection.
23742374

0 commit comments

Comments
 (0)