When is a switch statement better than multiple if statements?

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

Offline chinmay.sahooTopic starter

  • Trade Count: (0)
  • Full Member
  • ***
  • Thank You 2
  • Posts: 153
  • Karma: 0
    • No Addiction
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
1674 Views
Last post 02-26-2014, 02:40:05
by pauliakas
1 Replies
1785 Views
Last post 09-14-2014, 06:46:57
by fizzer
12 Replies
4176 Views
Last post 04-22-2016, 02:42:18
by MaryGreen
0 Replies
698 Views
Last post 01-06-2016, 02:26:30
by jaintech
0 Replies
182 Views
Last post 01-17-2017, 00:43:53
by beingchinmay