Skip to main content

Posts

Showing posts from March, 2019

if-Statement in Java (Control Flow in Java)

Teachmeandroidhub #java #if-elese Statement If-else Satament in Java                                               If-Statement mainly used to test the condition in this case it returns true or false .Let's Assume a situation where you have been asked or said to execute a statement there may be a condition should be true or false. Let suppose you have done something wrong then your father will be ask  that have you done this or not you may return true or false .If retun true then you may be get slapped else some other good thing can be happen also with you.So apart from above there are some different type if-else statement are as following if Statement if-else Statement if-else-if Ladder nested if statement  If Statement  in Java 1. If  Statement: -  Java  if condition check condition if  condition returns true then execute code under if block or if  condition returns false then exit. Syntax if(condition){   //code to be executed  } in the a