字符串截取的常用代码

<span style="white-space:pre">				</span>dateTime是一个String字符串
<span style="white-space:pre">				</span>String lasttwoCode=dateTime.substring(5, dateTime.length());
				int code=Integer.parseInt(lasttwoCode);
				System.out.println("获取大的时间类型"+lasttwoCode+".........."+code);
				if(code<11&&code<12)
				{
					if (lasttwoCode.length()!=2) {
						System.out.println("可以输出404");
					}
				}

你可能感兴趣的:(字符截取)