How can I make a java statement without using an IF or a switch statement?
-
How can I make a java statement without using an IF statement?or a switch I need help writing a program that shows a specific numbers...there are 2 scenarios and I cant use an IF or ...show more
-
Answer:
If it's just "one or the other" then use the ternary operator. something = (a < b ? a : b); This means If a<b, then a, otherwise b. You can use different comparison operators and different values, even strings, for a and b.
2OISVSRG5OZQBAGHQ5XVMAW5MI at Yahoo! Answers Visit the source
Other answers
System.out.println("text here in quotes");
dancer
Related Q & A:
- How can I make a Spinner only by java?Best solution by stackoverflow.com
- How can I make a myspace comment into a picture caption?Best solution by Yahoo! Answers
- How can I sell something on ebay without using a credit card?Best solution by Yahoo! Answers
- How can I remove a picture's watermark using Matlab's image processing toolbox?Best solution by Yahoo! Answers
- How can i make my font big without it being bold?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.