代码: using System; using System.Collections.Generic; using System.Diagnostics; using System.Threading; using System.IO; using System.Text; using System.Management; using System.Runtime.InteropServices; namespace Lemony.SystemInfo { /// /// 系统信息类 - 获取C…
public class Test { public static void main(String[] args) { //获取当前设备的CPU个数 int availableProcessors = Runtime.getRuntime().availableProcessors(); System.out.println(availableProcessors); } }…