Question: (a) In which line of the code does the error occur? (2 points) line number = (b) At the time the error occurs, what is

 (a) In which line of the code does the error occur?

(a) In which line of the code does the error occur? (2 points) line number = (b) At the time the error occurs, what is the value of the integer variable in main? (2 points)

(c) Why does the error occur? (very specific and precise answer) (2 points)

(d) Fix the code so that the error does not happen. (4 points)

(e) Why are there two methods called Test2 in the above class? (very specific and precise answer) (2 points)

1. public class Test2 f String song; double duration; 5. Test2(String S, double d) duration-d; 9 Test2(String S) 10 songS; duration 0.0; 13 public static void ain(String argaD) 14 15 16 17 18 19 Test2 songArray new Test2[30]; Test2 s1 new Test2("Help!",2.18); Test2 a2 new Test2("The Night Before" ,2.33); Test2 s3-nev Test2( You've Got to Hide Your Love Avay",2.08); Test2 4 new Test2(*1 Need You" ,2.28); Test2 s5 new Test2("Another Girl. ,2.05); Test2 s6 new Test2("You're Going to Lose That Girl. , 2.17); Test2 s7 new Test2( Ticket to Ride",3.10) 21 23 25 songArray[1s2 songArray 2s3 songArray [3s4 songArray4s5 songArray[5] s6 ; songArray[6] 87; 30 31 32 for (int i-0; i

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!