Question: 4. There are 2 compiler errors, in the code below; write the line that has an error and specify what the error is ? public

 4. There are 2 compiler errors, in the code below; write

4. There are 2 compiler errors, in the code below; write the line that has an error and specify what the error is ? public class A public int q; public void setq(int q) { this.q - q; } public void findIt(); public String toString() { return "q: "+q; } } class B extends AI private int y = 1; public void findit () { System.out.println(); } public String toString() { return "y: "+y; } Db- new DO; System.out.println(b.toString() ); } Q5. This will generate an error, because myNumbers[10] does not exist. Which exception should be added to prevent the Error? public class Main public static void main(String[] args) { int[] my Numbers = {1, 2, 3); System.out.println(myNumbers[10]); // error! } }

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!