Home » Tip Bank » Java
  • Comment on this Article
Language: Java
Expertise: Intermediate
Jan 9, 2019
  • facebook
  • twitter
  • google+
  • in
  • Email

WEBINAR:

On-Demand

Building the Right Environment to Support AI, Machine Learning and Deep Learning


Watch

Programmatically Querying the Number of CPU Cores in Java

Use the code sample below to use Java to find the number of CPU cores.

int cores = Runtime.getRuntime().availableProcessors();
Octavia Anghel
 
Submit a Tip
Browse "Java" Tips
Browse All Tips
codecademy.com
w3schools.com