您的位置:首页 > 其它

数据类型转换笔记

2004-12-07 09:46 330 查看
if(strM.equals("01"))
{
intM1="12";
tim1=Integer.toString(Integer.parseInt(strY)-1)+"-"+intM1;
}
else
{
int w = (Integer.parseInt(strM)-1);
if(w>9)
tim1=(strY)+"-"+Integer.toString(w);
else
tim1=(strY)+"-"+"0"+Integer.toString(w);

}

if(strM.equals("12"))
{
intM2="01";
tim2=Integer.toString(Integer.parseInt(strY)+1)+"-"+intM2;
}
else
{
int w1=Integer.parseInt(strM)+1;
if(w1>9)
tim2=(strY)+"-"+Integer.toString(w1);
else
tim2=(strY)+"-"+"0"+Integer.toString(w1);

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: