Dear Shai, I did make some more research on the various types of Java threads based on your comment on my post and it was an eye-opener, thanks for the comment once again.
I like to ask how long have you been a Java Developer, and what will be your advice as to the best way to become a better Java Developer?
Nicely said!
One additional piece of information to include would be the three types of threads through Java's history:
Green - the first version of Java had green threads. Which means the process itself was single threaded and simulated "real threads". This meant the CPU cores weren't used effectively.
Native - Very early versions of Java moved to native threads which means one Java thread == OS native thread. This means the CPU cores can be used properly but it also means you can't create too many threads... OS threads have a cost.
Virtual - With project Loom which is now in preview Java introduces a new type of thread: virtual. Which merges these two concepts. You will have what is effectively a green thread on top of an OS native thread. This way threads become very cheap but also use the CPU cores completely. There are some nuances here but the scale and elaborate nature of this feature are unique to the JVM. It's a pretty spectacular feature.