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 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

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 Programming Questions!