in Education by
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

1 Answer

0 votes
by
 
Best answer
Answer: (i)switch(2); This is a syntax error, there should be no semicolon after switch statement The correct Statement is:- switch(2) ____________ ii)System.out.println(670/0); Division by zero is a runtime error.

Related questions

0 votes
    (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...
asked Dec 31, 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
    No spammers please do it clear (show your work also) and how the answer comes please… int m=2 and int n=15 for(int i=1;i...
asked Dec 23, 2021 in Education by JackTerrance
0 votes
    double x=0.5; System.out.println(Math.rint(x)); ….Plzz give me the output… Select the correct answer from above options...
asked Dec 23, 2021 in Education by JackTerrance
0 votes
    Math Functions: System.out.println (Moth floor (-0.48)]; System.out.println (Math ceil (-0.46)); System.out.println ... Hound (-8.5)); Select the correct answer from above options...
asked Dec 16, 2021 in Education by JackTerrance
0 votes
    In Java, what will be the output of the following code and how? double x=2.9,y=2.5; (SOP is abbreviated form ... x),y)); Explain how Select the correct answer from above options...
asked Nov 28, 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
    What is the output of the following: System. out. Println(“Time\n and \t tide waits for\”no man\””); pls answer Select the correct answer from above options...
asked Dec 24, 2021 in Education by JackTerrance
0 votes
    What Is the output of the following:String a= Java is programming language \n developed by \t\'James Gosling\' ... ; Please Answer ASAP Select the correct answer from above options...
asked Dec 14, 2021 in Education by JackTerrance
0 votes
0 votes
0 votes
    (i) x=5, y=6,2=20 Q8) Consider the following statements and describe the output/statement required: ... multiple assignment statements. Select the correct answer from above options...
asked Nov 27, 2021 in Education by JackTerrance
...