CLASS 3: if else Statement In Java - MeraForum Community.No 1 Pakistani Forum Community

MeraForum Community.No 1 Pakistani Forum Community

link| link| link| link| link| link| link| link| link| link| link| link| link | link | link | link | link | link | link | link | link | link | link | link | link | link | link | link | link | link | link | link| link| link| link| link| link| link| link| link| link| link| link| link| link| link| link| link| link| link| link| link| link| link| link| link| link| link| link| link| link| link| link| link| link| link| link| link|
MeraForum Community.No 1 Pakistani Forum Community » The World of Information » Computer and Information Technology » Java » CLASS 3: if else Statement In Java
Java All about Java Programs

Advertisement
 
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
(#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, 01: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
 

Bookmarks

Tags
class, java, statement


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
3rd Class: if Statement In C++ Morash C++ 11 05-05-2015 02:18 AM
CLASS 2: How To Take Input In Java Morash Java 4 04-10-2014 01:13 AM
CLASS 1: How To Run And Print Message On Screen Using Java Through NetBeans IDE Morash Java 12 04-09-2014 02:49 PM
Best Statement By Sheikh Rashid mcitp-it Amazing Videos 0 05-28-2012 07:18 PM


All times are GMT +5. The time now is 07:06 AM.
Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.

All the logos and copyrights are the property of their respective owners. All stuff found on this site is posted by members / users and displayed here as they are believed to be in the "public domain". If you are the rightful owner of any content posted here, and object to them being displayed, please contact us and it will be removed promptly.

Nav Item BG