Computer Science, asked by ritikajainrj07, 6 months ago

char c = 'd';
switch(c)
case 'a':
System.out.print("a");
case 'b':
System.out.print("b");
case 'c':
System.out.print("c");
case 100:
System.out.print("100");
default :
System.out.print("No match");​

Answers

Answered by BrainlyProgrammer
1

Answer:

No match

Explanation:

Thank u for asking this question

:)

Answered by anindyaadhikari13
2

Answer:-

Given code,

char c = 'd';

{

switch(c)

case 'a':

System.out.print("a");

case 'b':

System.out.print("b");

case 'c':

System.out.print("c");

case 100:

System.out.print("100");

default :

System.out.print("No match");

}

Firstly, case 100 will execute.N

then the default statement will execute. (break keyword not given).

Output:-

100No match.

For verification,check the attachment.

Attachments:
Similar questions