Question: Use IntelliJ : my window.writeOutLine(. ); //comment Code the following: string) mystringArray: mystringArray-new String[3] mystringArrayt0]green; 3.1 TASK By inserting display statements containing expressions in the
Use IntelliJ :
my window.writeOutLine(. ); //comment 
Code the following: string) mystringArray: mystringArray-new String[3] mystringArrayt0]"green"; 3.1 TASK By inserting display statements containing expressions in the code above cause the following array-related errors Comment out an error when you have caused it. Your lab tutor will need to see the statement but you will need to get on with causing the next error without interference from other errors. 1. Compile error: Variable myStringArray might not have been initialised o i.e. myStringArray's value is undefined 2. Run-time error: NullPointerException (caused by an element of myStringArray not myStringArray itself) 3. Run-time error: ArrayIndexOutOfBoundsException 4. Finally display the length of the first element of myStringArray without error
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
