0

can we use break statement in if conditions??

9th Jul 2016, 11:50 AM
Anup Shetty
10 Réponses
+ 7
you can only use it for loop. if statement automatically breaks when the action is complete. but you can use it when you have an if statement inside a loop to break put of the loop
9th Jul 2016, 11:57 AM
Ore Falomo
Ore Falomo - avatar
+ 1
yes also switch
9th Jul 2016, 11:59 AM
Ore Falomo
Ore Falomo - avatar
0
"for" loop will use it to break running number
9th Jul 2016, 12:02 PM
Very hard!
Very hard! - avatar
0
awesome
9th Jul 2016, 12:03 PM
Anup Shetty
0
break statement use in switch case n if condition is automatically break statement
9th Jul 2016, 6:27 PM
Jayanti Dikshit
0
Just to add, you can use a return; statement instead if you want to break out of a series of if statements
9th Jul 2016, 10:41 PM
James
James - avatar
0
no u can't
13th Sep 2016, 3:02 AM
surya
0
you can only use the break statement in if conditions when ur if conditions are used inside a loop.
20th Oct 2016, 11:06 PM
Franky BrainBox
Franky BrainBox - avatar
- 3
no you can't
9th Jul 2016, 11:55 AM
Ore Falomo
Ore Falomo - avatar
- 3
not, break is use on swich broo
9th Jul 2016, 11:56 AM
Alejandro Melendez
Alejandro Melendez - avatar