Click here to Skip to main content
15,889,808 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have three ranges 1-10, 11-15, and 16-20 now I have a variable number field that creates a number between 1 - 20. I need a word to appear based on where the number falls inside of the three ranges, example in range one it would say low range two med range three high

What I have tried:

Nothing I can't seem to understand how to check and have it read ranges and then create numbers, I'm extremely very new at Java or any coding for that matter
Posted
Updated 7-Jan-17 2:53am
Comments
OriginalGriff 6-Jan-17 14:25pm    
Do note that "Java" and "Javascript" are totally different languages, used in different environments. A Java solution would not work in Javascript and via versa.
Please the "Improve Question" widget to edit your question and either change the tags or the text to show which you are talking about.

1 solution

Since you are "Extremely very new to Java", then you should frequent this The Java™ Tutorials[^].
Go through all the lessons and examples, no skipping. You will be able to solve your question (aka assignment). Pay particular attention to comparison operators (<, >, --, !=) and decision making construct (if else if). If you need to perform input/output operation, ask Google, there are plenty of examples out in the WWW.
 
Share this answer
 
v2
Comments
Maciej Los 7-Jan-17 15:10pm    
5ed!
Peter Leow 7-Jan-17 20:44pm    
Thank you, Maciej.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900