Top Posters
Since Sunday
New Topic  
Oughto Oughto
wrote...
Posts: 742
Rep: 1 0
7 years ago
What would be the value of x after the following statements were executed?

int x = 10;
switch (x)
{
  case 10:
      x += 15;
  case 12:
      x -= 5;
      break;
  default:
      x *= 3;
}

A) 25
B) 30
C) 20
D) 5
Textbook 
Starting Out with Java: Early Objects

Starting Out with Java: Early Objects


Edition: 4th
Author:
Read 162 times
3 Replies
Replies
Answer verified by a subject expert
ToothyToothy
wrote...
Top Poster
Posts: 744
Rep: 4 0
7 years ago
Sign in or Sign up in seconds to unlock everything for free
More solutions for this book are available here
1

Related Topics

Oughto Author
wrote...
7 years ago
I mentioned in my previous post that I chose this as an elective, thanks for helping me understand
wrote...
7 years ago
Thanks for providing feedback
New Topic      
Explore
Post your homework questions and get free online help from our incredible volunteers
  1248 People Browsing
Related Images
  
 451
  
 238
  
 380
Your Opinion
Which country would you like to visit for its food?
Votes: 204