Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

help me! image text in transcribed
image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Database Experts Guide To SQL

Authors: Frank Lusardi

1st Edition

0070390029, 978-0070390027

More Books

Students also viewed these Databases questions