Question: help me! 3 5 6 Identify the lines with errors in the following code set. 1 package examlCh11_007; 2 public class ExlArrayLoop02 ( public static

3 5 6 Identify the lines with errors in the following code set. 1 package examlCh11_007; 2 public class ExlArrayLoop02 ( public static void main(String[] args) { 4 Double[] a = new 13.2, 6.4, 10.2, 1.9, 16.7, 4.9, 13.1, 18.7, 5.6, 11.5); double max = 0; 7 int j = 0; for (i = 0; i max) 10 max = a (1); 11 9 = 1; 12 } 13 14 System.out.println("The index of the max value is " + 15 16 ) 17 } 8 9 11 1 1 3); O line 4 only O lines 4 and 8 only lines 8 and 10 only lines 4, 8, and 10 only lines 8, 10, and 14 only D000 Consider the code set below. 3 public class Ex1_RunSetGet { 4 public static void main(String[] args) { 5 6 SetGet sg = new SetGet("Samuel"); 7 8 System.out.println(sg.getName()); 9 } 10 ) 11 12 class SetGet { 13 14 private String name = "Kevin"; 15 16 SetGet(String name) { 17 18 ) 19 20 public void setName(String n) { 21 22 ) 23 24 25 26 27) name = n; What is the correct statement to be inserted in line 7 to change the value of the variable name on object sg to "Priya"? sg setName("Kevin", "Priya"); sg setName("Priya"); Sg.setName(String "Priya"); setName("Priya"); setName(String "Priya
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
