首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > J2SE开发 >

练习求指教

2012-06-20 
练习题求指教Java codeRunnable r new Runnable(){public void run(){System.out.print(Gaston.)}}S

练习题求指教

Java code
        Runnable r = new Runnable(){            public void run(){                System.out.print("Gaston.");            }        };        SwingUtilities.invokeLater(r);        try{sleep(1000);}catch(Exception ex){}        System.out.print("Alphonse.");


Java code
        Runnable r = new Runnable(){            public void run(){                System.out.print("Gaston.");            }        };                try{                        SwingUtilities.invokeAndWait(r);                        sleep(1000);                }catch(Exception ex){}        System.out.print("Alphonse.");

这两段代码的输出有如下选择(第一题是多选,第二题是单选):
A. Gaston.
B. Alphonse.
C. Gaston.Alphonse.
D. Alphonse.Gaston.

能告诉一下解题思路么?

[解决办法]
第一個是兩個都有可能
第二個是gaston

热点排行
Bad Request.