MeraForum Community.No 1 Pakistani Forum Community - View Single Post - CLASS 3: if else Statement In Java
View Single Post
(#1)
Old
Morash's Avatar
Morash Morash is offline
 


Posts: 17,781
My Photos: ()
Country:
Star Sign:
Join Date: Jul 2010
Location: ▌║█║▌│█│║▌║
Gender: Male
cool CLASS 3: if else Statement In Java - >>   Show Printable Version  Show Printable Version   Email this Page  Email this Page   04-10-2014, 02:08 AM




if else Statement In Java

This Is Another Form Of if Statement. It Is Used For Making Two Way Decisions.
In This Statement There Is One Condition And Two Statements.
If The Condition Is True The First Statement Is Executed And Second Statment Is Ignored.
And If The Condition Is False Then The Second Statement Is Executed And
First Statement Is Ignored.



Syntax:

if(condition)
{
statement 1 ;
}
else
{
statement 2;
}




Example:

Note: in.nextInt(); Is Used For Input Of Integer Type Value.
Whereas in.nextLine(); Is Used For Input Of String/Char Type Value.







Output:

 





bE driveN wiTh puRpOse, Be r313n71355 in your alιgnмenт;
with excellence.
pAy n0 mInd to the ∂ιsιмραssισηε∂ เ๓ק๏tєภt ђคtєгร

.. нoolιgan
Reply With Quote Share on facebook
Sponsored Links