Analyze the following code: public class Test implements Runnable { public static void main(String[] args) { Thread t = new Thread(this); t.start(); } public void run() { System.out.println("test"); } } ()

发布于 2021-02-15 03:25:24
【单选题】
A The program does not compile because this cannot be referenced in a static method.
B The program compiles fine, but it does not print anything because t does not invoke the run() method.
C The program compiles and runs fine and displays test on the console.
D None of the above.

查看更多

关注者
0
被浏览
40
  • 体验AI问答!更聪明、超智能!
  • 一款基于GPT的超级AI助手,可以对话、创作、写文案!
1 个回答

撰写答案

请登录后再发布答案,点击登录

发布
问题

手机
浏览

扫码手机浏览

分享
好友

在线
客服