The following two programs have syntax errors. Correct them. On each successive line, assume that any preceding error has been corrected. After you have corrected the syntax errors, type and compile...

The following two programs have syntax errors. Correct them. On each successive line, assume that any preceding error has been corrected. After you have corrected the syntax errors, type and compile these programs to check if all errors have been found. a. public class ProgWithErrorsA { static final int SECRET_NUM = 11,213; static final PAY_RATE = 18.35 public void main(String[] arg) { int one, two; double first, second; one = 18; two = 11; first = 25; second = first * three; second = 2 * SECRET_NUM; SECRET_NUM = SECRET_NUM + 3; System.out.println(first + " " + second + " " + SECRET_NUM); paycheck = hoursWorked * PAY_RATE System.out.println("Wages = " paycheck); } } b. public class ProgWithErrorsB { static final char = STAR = '*' static final int PRIME = 71; public static void main(String[] arg) { count = 1; sum = count + PRIME; x := 25.67; newNum = count * ONE + 2; sum + count = sum; x = x + sum * COUNT; System.out.println(" count = " + count + ", sum = " + sum + ", PRIME = " + Prime); } }



Jan 05, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers