Question: java 6 Q2. (15 points) Answer two questions using Array Test.java below. 1 package midterml; 2 3 public class Array Test { 4 5 public

 java 6 Q2. (15 points) Answer two questions using Array Test.java

java

6 Q2. (15 points) Answer two questions using Array Test.java below. 1 package midterml; 2 3 public class Array Test { 4 5 public static void main(String[] args) { String (I a; I 7 if (a [0] = null) { 8 System.out.println("Good!"); }; a = new String [1]; 11 a [0] = new String("a"); a[1] = new String ("b"): 13 a [0]. equals("a"); 14 } 9 10 12 15 } i. Instantiation (5 points) Identify all lines where instantiation happens. For each line, explain what is the type of the new instance. ii. (10 points) Identify two possible errors/exceptions in Array Test.java. Explain your

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!