java如何判断一个数是不是整数

如题所述

第1个回答  2016-12-22
if (x instanceof Integer || x instanceof Long) {
//是整数

}else {
//不是整数

}本回答被提问者采纳
相似回答