CLASS 4: Calculator Using Switch Statement In Java
Calculator In Java Using Switch Statement The switch Statement Is Used As A Reciprocal Of nested if else Statements. It Is Used When Multiple Choices Are Given And One Choice Is To Be Selected. The 'nested if-else' Structure Becomes Complicated In Multiple Choices So Then We Used switch Statement. One Of The Choices Or Cases In The switch Statement Is Executed Depending Upon The Value Returned By The Expression. In The switch Statement The break Statement Is Normally Used At The End Of Statements In Each Case. It Exits The Control From The Body Of switch Structure. If It Is Not Used Then The Statements Of Other Cases That Come After The Matching Case Will Also Be Executed. Syntax switch(expression) { case constant: statement; break; } Example Of Making A Calculator http://i57.tinypic.com/2rh1lzb.jpg Output Addition http://i60.tinypic.com/2uf3re1.jpg Subtraction http://i61.tinypic.com/2cpumj9.jpg Multiplication http://i58.tinypic.com/24p02l2.jpg Division http://i58.tinypic.com/2iviipw.jpg |
Re: CLASS 4: Calculator Using Switch Statement In Java
Gooo shaarIng
|
Re: CLASS 4: Calculator Using Switch Statement In Java
This is great share morash, I will try this and will let you know if I have any question about it
|
Re: CLASS 4: Calculator Using Switch Statement In Java
nice sharing bro da java ba za sta na yadom khu ma di rab tek no. zama tol fan chi sok di salamona warla waya
|
Re: CLASS 4: Calculator Using Switch Statement In Java
Morash check this code, It's giving me error don't know why
Code:
package cal; |
Re: CLASS 4: Calculator Using Switch Statement In Java
Quote:
Last 2 Jo System.out.print K Statements Hai Os Mai is K Saath Jo Double Commas Lage Hai, Wo Remove Karo And Equal Sign K Baad Lagana .. |
Re: CLASS 4: Calculator Using Switch Statement In Java
Thanks morash.
|
All times are GMT +5. The time now is 04:52 PM. |
Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.