There are five syntax errors each error.

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter2: Using Data
Section: Chapter Questions
Problem 14RQ
icon
Related questions
Question
2222
0539
* Question Completion Status:
444+
There are five syntax errors in the following java program. Explain them by mentioning the line number with
each error.
1 public class Find Errors {
public static void main (String[] args) {
int a = 8;
2
3
4
int b = 9.0;
int x;
6.
System.out.println ('Sum of a and b is ' + (a+b));
if( a = b)
8
X = a;
else
10
x = b;
11
switch (b > a) {
case 0: System.out.println (x);
default: System.out.println (x):
12
13
14
}
15
}
Click Save and Submit to save and submit. Click Save All Answers to save all answers.
Answers
Transcribed Image Text:2222 0539 * Question Completion Status: 444+ There are five syntax errors in the following java program. Explain them by mentioning the line number with each error. 1 public class Find Errors { public static void main (String[] args) { int a = 8; 2 3 4 int b = 9.0; int x; 6. System.out.println ('Sum of a and b is ' + (a+b)); if( a = b) 8 X = a; else 10 x = b; 11 switch (b > a) { case 0: System.out.println (x); default: System.out.println (x): 12 13 14 } 15 } Click Save and Submit to save and submit. Click Save All Answers to save all answers. Answers
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Concept of Parenthesis
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT