I want to ask how to write a method to stop if -else function running else part but can run if part thank you. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

I want to ask how to write a method to stop if -else function running else part but can run if part thank you.

18th Oct 2016, 2:43 PM
danny
2 Answers
0
If I have understood you correctly, I believe, this is what you want. -- Just don't put "else" on it. Just put both of your conditions in "if" clause if (CONDITION1) //do this if (CONDITION2) //do this also NO MORE "ELSE" PART.
18th Oct 2016, 8:16 PM
Erwin Mesias
Erwin Mesias - avatar
0
Ok thanks
19th Oct 2016, 8:05 AM
danny