programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
• Campbell Ritchie
• Tim Cooke
• Devaka Cooray
• Ron McLeod
• Jeanne Boyarsky
Sheriffs:
• Liutauras Vilda
• paul wheaton
• Junilu Lacar
Saloon Keepers:
• Tim Moores
• Stephan van Hulst
• Piet Souris
• Carey Brown
• Tim Holloway
Bartenders:
• Martijn Verburg
• Frits Walraven
• Himai Minh

# Switch Case Statement

Greenhorn
Posts: 19
• Number of slices to send:
Optional 'thank-you' note:
Hi everyone.

I'm asked to a write JAVA switch...case statement that calculates Grades. My question is that how i could show this statement on the paper?

Sheriff
Posts: 67682
173
• Number of slices to send:
Optional 'thank-you' note:
Java, not JAVA. It's not an acronym.

What do you mean by "on the paper"?

Ranch Hand
Posts: 48
• Number of slices to send:
Optional 'thank-you' note:
Hi Serkan
I think you can also use the if (condition){} for this
If x =>90<=100 system.out,println("A") else

Bear Bibeault
Sheriff
Posts: 67682
173
• Number of slices to send:
Optional 'thank-you' note:

Molayo Decker wrote:Hi Serkan
I think you can also use the if (condition){} for this
If x =>90<=100 system.out,println("A") else

He specially said that he meeds to use switch statement -- I presume as an assignment.

But yes, a switch isn't the best way to accomplish this in the real world.

Greenhorn
Posts: 2
• Number of slices to send:
Optional 'thank-you' note:

Looks shorter, huh? At least, it should fit A4 "paper"

Serkan Kilic
Greenhorn
Posts: 19
• Number of slices to send:
Optional 'thank-you' note:

Ronald Zet wrote:
Looks shorter, huh? At least, it should fit A4 "paper"

This helped a lot. Thank you so much!!

Marshal
Posts: 76885
366
• Number of slices to send:
Optional 'thank-you' note:

Ronald Zet wrote:. . .At least, it should fit A4 "paper"

And welcome to the Ranch

Ranch Hand
Posts: 271
1
• Number of slices to send:
Optional 'thank-you' note:
a variation of the same theme:

Campbell Ritchie
Marshal
Posts: 76885
366
• Number of slices to send:
Optional 'thank-you' note:
But please everybody put case and break on lines by themselves.

 Consider Paul's rocket mass heater.