Question: Question 5. The following program contains 5 mistakes. Please find and name these mistakes. [20 points) public class Oops { public static void main(String[] args)

Question 5. The following program contains 5 mistakes. Please find and name these mistakes. [20 points) public class Oops { public static void main(String[] args) { int x; System.out.println("x is " + x); int x = 15.2; // set x to 15.2 System.out.println("x is now " + x); int y; // set y to 1 more than x y = int x + 1; System.out.println("x and y are " + x + and + y); } }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
