Java All about Java Programs |
Advertisement |
|
Thread Tools | Display Modes |
(#1)
|
|
||||
CLASS 3: if else Statement In Java -
>>
Show Printable Version
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 ☠
|
Sponsored Links |
|
(#2)
|
|
||||
Re: CLASS 3: if else Statement In Java -
>>
Show Printable Version
Email this Page
04-10-2014, 11:49 AM
|
(#3)
|
|
|||
Re: CLASS 3: if else Statement In Java -
>>
Show Printable Version
Email this Page
04-10-2014, 12:39 PM
|
(#4)
|
|
|||
Re: CLASS 3: if else Statement In Java -
>>
Show Printable Version
Email this Page
04-10-2014, 01:04 PM
|
(#5)
|
|
||||
Re: CLASS 3: if else Statement In Java -
>>
Show Printable Version
Email this Page
04-10-2014, 03:56 PM
Thanks morash, done with it .
ALLAH FARMATA HAI : AEY BANDEY JO HUA WO ACHA HUA . JO HORAHA HAI ACHA HO RAHA HAI. JO HOGA WO BHI ACHA HOGA. TERA KIYA GAIYA JO TU ROTA HAI TU KIA LAYA JO TU NE KHO DIYA. JO LIYA YAHIN (DUNYA) SEI LIYA JO DIYA YAHIN (DUNYA) PE DIYA JO AAJ TERA HAI PEHLAY KISI AUR KA THA AUR KAL KISI AUR KA HOGA. TABDEELI KAINAAT KA MAMOOL HAI BAS TU WO JAMA KAR JO TU SATH LEI KAR JANEY WALA HAI YANI NAIK AMAAL. |
(#6)
|
|
||||
Re: CLASS 3: if else Statement In Java -
>>
Show Printable Version
Email this Page
04-10-2014, 04:24 PM
Morash, how we can input character if we want to. I know, we have to declare char a[42]; but that was in C++. if you could share a small program in which we can decalre a character and take input that would be really helpful.
ALLAH FARMATA HAI : AEY BANDEY JO HUA WO ACHA HUA . JO HORAHA HAI ACHA HO RAHA HAI. JO HOGA WO BHI ACHA HOGA. TERA KIYA GAIYA JO TU ROTA HAI TU KIA LAYA JO TU NE KHO DIYA. JO LIYA YAHIN (DUNYA) SEI LIYA JO DIYA YAHIN (DUNYA) PE DIYA JO AAJ TERA HAI PEHLAY KISI AUR KA THA AUR KAL KISI AUR KA HOGA. TABDEELI KAINAAT KA MAMOOL HAI BAS TU WO JAMA KAR JO TU SATH LEI KAR JANEY WALA HAI YANI NAIK AMAAL. |
(#7)
|
|
||||
Re: CLASS 3: if else Statement In Java -
>>
Show Printable Version
Email this Page
04-12-2014, 01:13 AM
Quote:
Phir Os Ko Char Array Mai Change Karengy .. Next Thread Mai Program Bana K Share Karta Hon ..
➳ 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 ☠
|
Bookmarks |
Tags |
class, java, statement |
|
|
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 |