(j) State the type of errors if any in the following statements:
(i) switch ( n > 2 )
(ii) System.out.println(100/0);
Answers
Answered by
41
1 syntax error
2 run time error
rajs69922:
Thanks
Answered by
32
The errors as observed in the statements given below are as follows:
1. switch ( n > 2 ) : this error is regarded as syntax error
2. System.out.println(100/0): this error is regarded as runtime error.
The first error, that is, the syntax error is an error that has occurred in the coding by the programmer.
The second error, that is, the runtime error occurred at the time of execution of a particular type ofprogram.
Similar questions
English,
6 months ago
Computer Science,
6 months ago
Business Studies,
6 months ago
Math,
1 year ago
Business Studies,
1 year ago