. 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
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
Social Sciences,
3 months ago
Social Sciences,
6 months ago
Biology,
6 months ago
Hindi,
11 months ago
English,
11 months ago
Science,
11 months ago