网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
//pointXpublicclassfoo{publicstaticvoidmain(String[]args)throwsException{java.io.printWriterout=newjava.io.PrintWriter{newjava.io.outputStreamWriter(System.out),true;out.printIn(Hello”);}}}WhichstatementatPointXonline1allowsthiscodetocompileandrun?()
A.Importjava.io.*;
B.Includejava.io.*;
C.Importjava.io.PrintWriter;
D.Includejava.io.PrintWriter;
E.Nostatementisneeded.
参考答案
更多 “ //pointXpublicclassfoo{publicstaticvoidmain(String[]args)throwsException{java.io.printWriterout=newjava.io.PrintWriter{newjava.io.outputStreamWriter(System.out),true;out.printIn(Hello”);}}}WhichstatementatPointXonline1allowsthiscodetocompileandrun?()A.Importjava.io.*;B.Includejava.io.*;C.Importjava.io.PrintWriter;D.Includejava.io.PrintWriter;E.Nostatementisneeded. ” 相关考题
考题
publicclassTestOne{publicstaticvoidmain(String[]args)throwsException{Thread.sleep(3000);System.out.println(”sleep”);}}Whatistheresult?()
A.Compilationfails.B.Anexceptionisthrownatruntime.C.Thecodeexecutesnormallyandprints“sleep”.D.Thecodeexecutesnormally,butnothingisprinted.
考题
publicclassStarterextendsThread{privateintx=2;publicstaticvoidmain(String[]args)throwsException{newStarter().makeItSo();}publicStarter(){x=5;start();}publicvoidmakeItSo()throwsException{join();x=x-1;System.out.println(x);}publicvoidrun(){x*=2;}}Whatistheoutputifthemain()methodisrum?()A.4B.5C.8D.9E.Compilationfails.F.Anexceptionisthrownatruntime.G.Itisimpossibletodetermineforcertain.
考题
//pointXpublicclassfoo(publicstaticvoidmain(String[]args)throwsException{printWriterout=newPrintWriter(newjava.io.outputStreamWriter(System.out),true;out.printIn(Hello”);})WhichstatementatPointXonline1allowsthiscodetocompileandrun?()A.Importjava.io.PrintWriter;B.Includejava.io.PrintWriter;C.Importjava.io.OutputStreamWriter;D.Includejava.io.OutputStreamWriter;E.Nostatementisneeded.
考题
//PointXpublicclassfoo{publicstaticvoidmain(String[]args)throwsException{jave.io.PrintWriterout=newjave.io.PrintWriter(newjave.io.OutputStreamWriter(System.out),true);out.println(Hello”);}}WhichstatementatPointXonline1isrequiredtoallowthiscodetocompile?()A.Nostatementisrequired.B.importjave.io.*;C.includejava.io.*;D.importjave.io.PrintWriter;E.includejava.io.PrintWriter;
考题
以下哪个是有效的Java程序入口函数?A.public static void main(String[] args);B.public static void main();C.public static int main(String[] args);D.public static void main(int argc, String[] args)
考题
以下哪个main方法是正确的?A.public static void main(string[] args)B.public static void Main(String[] args)C.public static void main(String[] args)D.public static main(String[] args)E.public void main(String[] args)
考题
main()方法的正确定义方式是()。A.public static void main (String [ ] args ) { new NameSurfer().start (args ) ; }B.public static main (String [ ] args ) { new NameSurfer().start (args ) ; }C.public void main (String [ ] args ) { new NameSurfer().start (args ) ; }D.public static void main (String [ ] args ) { NameSurfer().start (args ) ; }
考题
以下哪个是有效的Java程序入口函数?A.public static void main(String[] args);B.public static void main();C.public static int main(String[] args);D.public static void main(int argc, String[] args)E.main()
考题
19、以下哪个是有效的Java程序入口函数?A.public static void main(String[] args);B.public static void main();C.public static int main(String[] args);D.public static void main(int argc, String[] args)
热门标签
最新试卷