Computer Science, asked by ayush3027, 6 months ago

. Give the output of the following code segment:

char ch=’g’;

switch(ch)

{

case ‘g’: System.out.println(“G”);

case ‘h’: System.out.println(“H”);

default : System.out.println(“I”);

}​

Answers

Answered by shreya4183
2

Answer:

Output

G

Explanation:

the value of ch is g,so in switch case it will execute the case 'g' in which G has written for output

plz mark it brainliest

Similar questions