摘要: Java中不能将float和doublu类数据作为switch(...)中的表达式!其它语言有待验证-_-!...验证代码如下:public class test{public static void main(String[] args) {float b =1.0f;//double c=2.0;switch(b){case 1.0f: break;//case 2.0;default: ;}}}出错提示如下: 阅读全文
posted @ 2011-12-18 16:01 氺〤魚Oo。 阅读(201) 评论(0) 推荐(0) 编辑
摘要: // 几行代码我就不解释啦!import java.lang.Runtime;import java.io.IOException;public class runCmd { public static void main(String[] args) { try{ Runtime.getRuntime().exec("cmd.exe /c start cmd.exe"); } catch(IOException e){ System.out.println("运行cmd程序时出现错误!\n"+e.toString()); } System.out.pr 阅读全文
posted @ 2011-12-18 15:18 氺〤魚Oo。 阅读(149) 评论(0) 推荐(0) 编辑