以下代码的调试结果为? public class Bground extends Thread { public static void main(String argv[]) { Bground b = new Bground(); b.run(); } public void start() { for (int i = 0; i <10; i++) { System.out.println("Value of i = " + i); } } }
A.
编译错误,没有定义线程的 run 方法;
B.
由于没有定义线程的 run 方法,而出现运行错误;
C.
编译通过,运行输出 values 0 to 9
D.
编译通过,运行无输出
拍照语音搜题,微信中搜索"皮皮学"使用
参考答案:
参考解析:
知识点:
皮皮学刷刷变学霸
举一反三
【单选题】Today's trumpet (小号) is one of the world's oldest instruments. It is the result of many centuries of development. Although it looks nothing like its ancestors, there are many similarities. All trumpet...
【单选题】Today’s trumpet is one of the world’s oldest instruments. It is really the result of many centuries of development. Al though it looks nothing like its ancestors, there are many similarities. All trum...
【单选题】Today's trumpet is one of the world's oldest instruments. It is the result of many centuries of development. Although it looks nothing like its ancestors, there are many similarities. All trumpets dir...
【简答题】There are many wetlands in China and some of them are the world’s important wetlands. The Chinese Yellow Sea Wetlands are among them. They are in Yancheng, Jiangsu Province, the east of China. They ar...
【单选题】Today's trumpet is one of the world’s oldest instruments. It is really the result of many centuries of development. Al-though it looks nothing like its ancestors, there are many similarities. All trum...