Question: Given the following code: Which import statements, when inserted independently at (1), will make the program print 7, when the program is compiled and run?
Given the following code:

Which import statements, when inserted independently at (1), will make the program print 7, when the program is compiled and run? Select the two correct answers.
(a) import static Math.*;
(b) import static Math.sqrt;
(c) import static java.lang.Math.sqrt;
(d) import static java.lang.Math.sqrt();
(e) import static java.lang.Math.*;
// (1) INSERT ONE IMPORT STATEMENT HERE public class RQ700A20 { public static void main (String [] args) { System.out.println (sqrt (49)); } }
Step by Step Solution
3.51 Rating (151 Votes )
There are 3 Steps involved in it
c and e The name of the class must b... View full answer
Get step-by-step solutions from verified subject matter experts
