Click here to load reader

Daffodil International University. Object oriented programming JAVA if else statement And switch case , JAVA if else statement And switch case

  • Upload
    mon-mon

  • View
    234

  • Download
    2

Embed Size (px)

Citation preview

Welcome to presentation

Our Topic is if else statementAnd switch case

Welcome to our presentation

Definition of if else and swetch statement:Theif-thenstatement is the most basic of all the control flow statements. It tells your program to execute a certain section of codeonly ifa particular test evaluates totrue. Theif-then-elsestatement provides a secondary path of execution when an "if" clause evaluates tofalse

Aswitch statementchecks if a variable is equal to a list of values. The variable in theswitch statement

Public class ElseIf{public static void main(String[]args){ int number=30;if(number