One way is printing the GC details using -verbose:gc
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.
Since this is Beginning Java: you don't need it. The jvm will do the work for you.
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.