When is a switch statement better than multiple if statements?

Author Topic: When is a switch statement better than multiple if statements?  (Read 535 times)

Offline chinmay.sahooTopic starter

  • Trade Count: (0)
  • Full Member
  • ***
  • Thank You 2
  • Posts: 159
  • Karma: 0
    • Hot Shaper
Switch statement is better used when it required to check more then one condition with the same variable. A switch statement check the condition only ones.


 

Related Topics

  Subject / Started by Replies Last post
0 Replies
1933 Views
Last post 02-26-2014, 02:40:05
by pauliakas
1 Replies
2090 Views
Last post 09-14-2014, 06:46:57
by fizzer
12 Replies
4877 Views
Last post 04-22-2016, 02:42:18
by MaryGreen
0 Replies
850 Views
Last post 01-06-2016, 02:26:30
by jaintech
1 Replies
749 Views
Last post 09-23-2017, 04:00:51
by damponting44