1 public class Test {2 3 public static void main(String[] args) {4 //获取当前设备的CPU个数5 int availableProcessors = Runtime.getRuntime().availableProcessors();6 System.out.println(availableProcessors);7 }8 }
本文共 284 字,大约阅读时间需要 1 分钟。
1 public class Test {2 3 public static void main(String[] args) {4 //获取当前设备的CPU个数5 int availableProcessors = Runtime.getRuntime().availableProcessors();6 System.out.println(availableProcessors);7 }8 }
转载于:https://www.cnblogs.com/wang1001/p/9603862.html