in Education by
(j) State the type of errors if any in the following statements: (i) switch ( n > 2 ) (ii) System.out.println(100/0); Select the correct answer from above options

1 Answer

0 votes
by
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.

Related questions

0 votes
    State the type of errors if any in the following statements: (i) switch ( 2 ); (ii) System.out.println(670/0); pls answer Select the correct answer from above options...
asked Dec 25, 2021 in Education by JackTerrance
0 votes
    2. State whether the following statements are true (T) or false (F). a. Assembly Language uses a ... for providing instructions. Select the correct answer from above options...
asked Dec 14, 2021 in Education by JackTerrance
0 votes
    converting for loop into while loop: for(i=1;i...
asked Nov 26, 2021 in Education by JackTerrance
0 votes
    What will be the output produced by following code statements? State reason(s). i. (17%5) == (17%5.0) ii. (87 // 5 ... int((87 / 5.0)) Select the correct answer from above options...
asked Dec 19, 2021 in Education by JackTerrance
0 votes
    What will be the output produced by following code statements? State reason(s). i. (17%5) == (17%5.0) ii. (87 // 5 ... int((87 / 5.0)) Select the correct answer from above options...
asked Dec 18, 2021 in Education by JackTerrance
0 votes
    int find(int i) { if(>1) j=find(j/10)+(j%10) else j=0; return j; void main() int i=1000 int k k=find(i): printf(“%d”, K) Select the correct answer from above options...
asked Dec 29, 2021 in Education by JackTerrance
0 votes
    int find(int j) { if(>1X j=find(j/ 10)+(%10); } else { j=0; return j; void main() int i=1000, int k; k=find(i); printf(“%d”, k); Select the correct answer from above options...
asked Dec 29, 2021 in Education by JackTerrance
0 votes
    II. State whether the following statements are True or False. 1. Data is very secure in a Bus Topology. 2. ... distance like a city Select the correct answer from above options...
asked Dec 21, 2021 in Education by JackTerrance
0 votes
    State wheter the following statements are true or false. Use a regular font to highlight a word Select the correct answer from above options...
asked Dec 19, 2021 in Education by JackTerrance
0 votes
    State wheter the following statements are true or false. larger fonts catch reader’s attention Select the correct answer from above options...
asked Dec 19, 2021 in Education by JackTerrance
0 votes
    State the types of error if any following statement. (i)System.out.println(100/0) Select the correct answer from above options...
asked Dec 10, 2021 in Education by JackTerrance
...