Question: The following code includes 10 errors (an error per line). a) Find the errors and classify them as compilation errors, fatal logical errors or

The following code includes 10 errors (an error per line). a) Find the errors and classify them as compilation errors, fatal logical errors or nonfatal logical errors. b) Correct the errors and give the exact output after correcting the code. int x, y, my Num = 0; double d = 10 + x; x = 3; y = d + 2; if (! x>5) System.out.println('Result1 = + x); Else " System.out.print In ("Result1 = + y); System.out.println("Result2 = %d" + myNum); System.out.println("Result3 = "xmyNum); myNum++; System.out.printf("Result 4 = %.0f " + d);
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
