. 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
World Languages,
2 months ago
History,
2 months ago
Social Sciences,
4 months ago
Biology,
4 months ago
Hindi,
9 months ago
English,
9 months ago
Science,
9 months ago