1

Choose all the lines which if inserted independently instead of "//insert code here" will allow the following code to compile: public class Test{ public static void main(String args[]){ add(); add(1); add(1, 2); } // insert code here }

Correct Answer: static void add(int...args){}

Make the most of this question

This page focuses on one JAVA MCQs question from Programming. After checking the answer, return to the topic list to practice more or run a timed set.

JAVA MCQs MCQ: Choose all the lines which if inserted independently instead of "//insert code here" will allow the following code to compile: public class Test{ public static void main(String args[]){ add(); add(1); add(1, 2); } // insert code here } | Extra Education