Question: JAVA only please **********CODE that needs checking************** /* * This Java program inlcudes several errors. One error will keep it from compiling. * The remaining
JAVA only please


**********CODE that needs checking**************
/* * This Java program inlcudes several errors. One error will keep it from compiling. * The remaining errors will throw exceptions and/or prevent correct output. * * Some errors could be the result of bad typing; some errors are the results of bad logic. * There are NO COMMENTS in this code, and not a lot of whitespace. * * Fix all the errors to produce the output shown in the lab instructions. */ public class TestCake {public static void main(String[] args) { myCake[] myCake = new Cake[4]; myCake[1] = new Cake( "Hello my friend." ); myCake[2] = new Cake( "How are you? " ); myCake[3] = new Cake( ); myCake[4] = new Cake( "Have a great one!" ); for( int x = 0; x
****************************************************************************************************
Thanks!
Expected Output After fully debugging the program, your results should exactly match those provided below: Hello my friend. The String at subscript 0 is 16 characters long How are you? The String at subscript 1 is 13 characters long Happy birthday! The String at subscript 2 is 15 characters long. Have a great one! The String at subscript 3 is 17 characters long
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
