CLASS 3: if else Statement In Java
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. http://i61.tinypic.com/10mlo2o.jpg Output: http://i59.tinypic.com/rsfvq0.jpg |
Re: CLASS 3: if else Statement In Java
Thnksssss For shaarinG M
|
Re: CLASS 3: if else Statement In Java
Thanks for nice sharing dear................
|
Re: CLASS 3: if else Statement In Java
Gud Job Best Of Luck ... Thankx For sharing Kabi to Kam ajega na ..
|
Re: CLASS 3: if else Statement In Java
Thanks morash, done with it ;).
|
Re: CLASS 3: if else Statement In Java
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. |
Re: CLASS 3: if else Statement In Java
Quote:
Phir Os Ko Char Array Mai Change Karengy .. Next Thread Mai Program Bana K Share Karta Hon .. |
All times are GMT +5. The time now is 06:37 PM. |
Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.