Computer Science, asked by rajs69922, 1 year ago

(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 sanjana1707
41

1 syntax error

2 run time error


rajs69922: Thanks
Answered by Arslankincsem
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