Q.– Given class MainTest.java :-
public class MainTest{
public static void main(String[ ] args) {
System.out.println("String main " + args[0]);
}
}
and commands:-
bin> javac MainTest.java
bin> java MainTest "1 2 3"
What is the result?
A) String main 1 2 3
B) An exception is thrown at runtime.
C) String main 123
D) String main 1
⧪ please give your answer in a comment section.
public class MainTest{
public static void main(String[ ] args) {
System.out.println("String main " + args[0]);
}
}
and commands:-
bin> javac MainTest.java
bin> java MainTest "1 2 3"
What is the result?
A) String main 1 2 3
B) An exception is thrown at runtime.
C) String main 123
D) String main 1
⧪ please give your answer in a comment section.
3 Comments
A
ReplyDeleteA
ReplyDeleteB
ReplyDelete