How to sleep a thread in Java

  • 21 July 2016
  • ADM

How to sleep a thread in Java using Thread.sleep() method. Comparison between sleep millis an nanos.


How to get CPU cores in Java

  • 16 September 2020
  • ADM

A system may contain multiple physical CPUs (central processing unit), and can contain one or more cores (processors). Also, each core can have multiple threads, usually 2. (Hyper-threading Technology from Intel CPUs).