N Ngoc Hue New member Sep 19, 2021 #1 What will be the output of the following Java program? Code: class c { public void main( String[] args ) { System.out.println( "Hello" + args[0] ); } } A. Hello c B. Hello C. Hello world D. Runtime Error
What will be the output of the following Java program? Code: class c { public void main( String[] args ) { System.out.println( "Hello" + args[0] ); } } A. Hello c B. Hello C. Hello world D. Runtime Error
Đ Đức Linh New member Sep 19, 2021 #2 Answer: d Explanation: A runtime error will occur owning to the main method of the code fragment not being declared static. Output: Code: $ javac c.java Exception in thread "main" java.lang.NoSuchMethodError: main This Section of our 1000+ Java MCQs focuses on Character and Boolean Datatypes of Java Programming Language. Upvote 0 Downvote
Answer: d Explanation: A runtime error will occur owning to the main method of the code fragment not being declared static. Output: Code: $ javac c.java Exception in thread "main" java.lang.NoSuchMethodError: main This Section of our 1000+ Java MCQs focuses on Character and Boolean Datatypes of Java Programming Language.