Question: 1. The following program has many syntax errors: import java.util.*; Public class Buggy: * * * This static method should take an integer x and

1. The following program has many syntax errors: import java.util.*; Public class Buggy: * * * This static method should take an integer x and return: x + 1 if x is even the unchanged value of x when x is odd */ public static makeOdd(x) { if x % 2 = 0: X =+ 1 return x; } public void main(String args) { console = Scanner(System.in) System.print("Enter an integer x: ') int x = Scanner.nextInt() System.println("makeOdd(x) ", makeOdd(x)); } } Determine and fix all of the problems with this program so that it will compile and do the following when run
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
