java或者android中获取cpu数量的方法

Runtime.getRuntime().availableProcessors();