赞
踩
10.3 /*
* To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author Administrator
*/
class MyInteger{
int value;
String value1;
MyInteger(int value){
this.value=value;
}
MyInteger(String value1){
this.value1=value1;
}
int getValue(){
return value;
}
boolean isEven(){
return value%2==0?true:false;
}
boolean isOdd(){
return value%2!=0?true:false;
}
boolean isPrime(){
for(int i=2;iif (value%i!=0)
return true;
return false;
}
boolean isEven(int value){
this.value=value;
return value%2==0?true:false;
}
boolean isOdd(int value){
this.value=value;
return value%2!=0?true:false;
}
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。