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.