When is a switch statement better than multiple if statements?

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

Offline chinmay.sahooTopic starter

  • Trade Count: (0)
  • Full Member
  • ***
  • Thank You 2
  • Posts: 158
  • Karma: 0
    • We Helpline
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
3593 Views
Last post 02-26-2014, 02:40:05
by pauliakas
1 Replies
4145 Views
Last post 09-14-2014, 06:46:57
by fizzer
12 Replies
6572 Views
Last post 04-22-2016, 02:42:18
by MaryGreen
0 Replies
2423 Views
Last post 01-06-2016, 02:26:30
by jaintech
2 Replies
31997 Views
Last post 03-01-2019, 23:59:36
by harrywood