class tt{
public static void main(String[] args){
String[] tomuno = {"12",":","30",};
System.out.println(tomuno[0]+":"+tomuno[2]);
}
}
public static void main(String[] args){
String[] tomuno = {"12",":","30",};
System.out.println(tomuno[0]+":"+tomuno[2]);
}
}
解决方案 »
- 主线程 如何等待定时任务子线程结束在运行后面的代码
- 页面乱码问题(高手进)??
- 高手帮忙看下这个servlet,在线等,马上结帐!
- 怎样获取传入页面(即上一个页面)的网址啊??
- 怎样使jsp表单提交到本页面后二级联动下拉列表选中的值保持不变
- 谁能帮忙找个图片jsp中图片轮显的例子?
- 页面关闭问题
- Hibername延迟检索问题?lazy ,Could not initialize proxy the owning session was closed
- 有没有jfreechart根据数据库中得数据画折线图得完整得例子?
- 一个关于mysql的问题???急,再线等待
- Java调用VB后台程序(如何实现)
- [求助]servlet用法??
public class Test {
public String dateTrans(String time)
{
int hour,minute,sec;
String[] temp = new String[3];
int loc = time.indexOf(".");
temp[0] = time.substring(0,loc);
temp[1] = time.substring(loc+1,time.length());
minute = (int) (Integer.parseInt(temp[1])*36/60);
sec = (int) ((Integer.parseInt(temp[1])*36)%60);
if(sec == 0)
{
temp[2] = "00";
}
else if (sec <10)
{
temp[2] = "0"+String.valueOf(sec);
}
else{
temp[2] = String.valueOf(sec);
}
return temp[0]+":"+String.valueOf(minute)+":"+temp[2];
} public static void main(String[] args) {
Test test = new Test();
System.out.print(test.dateTrans("12.30"));
}}