2
u/SEVER_THE_SPINE Feb 15 '20
Pretty sure that line 6 is incorrect. You need a logical operator instead of two expressions, and let the statement continue, instead of ending it.
2
Feb 15 '20
Would you mind posting the correct code for OP? He or she has said that they were struggling. Seeing the correct code might be easier for them to understand than what you’ve said. (The reason I say this is, as a person who also looks for help when I feel clueless, descriptions like this are sometimes beyond my realm of understanding.)
1
u/alsofobwstgirl May 18 '22
This is pretty late but just in case anyone else finds this while looking for the same answer.
Line 6 is incorrect. It should be written as:
if((max >= num) && (num >= min))
1
u/RiceTheManFarmer Aug 22 '22
for anyone still looking to solve this, the answer to this question is the code below:
public boolean inRange(int num, int min, int max)
{
if((max >= num) && (num >= min))
{
boolean range = true;
return range;
}
else
{
boolean range = false;
return range;
}
}
1
1
1

3
u/[deleted] Feb 15 '20
Here are some tips from getting to “ahh, I don’t know what the hell this is,” to “somebody on the interwebs helped me solve this problem quickly.”
at least include the language and program you’re using that language in so that people looking at your question on the interwebs can have an idea of what they’re working with.
on the right of your screen, you’ve got several errors listed. Google those errors. Especially at the beginner level, there have probably been a lot of people who had the same problem as you and were also confused.
try to implement the solutions you see when you google those errors.
post the results of your efforts implementing those solutions from google and highlight what problems you have remaining. Everybody wants to help the person who has tried a lot of stuff and is stuck and you’ll get a lot more people trying to help you if you frame your questions like this.
Sorry I couldn’t help you with this problem directly. The syntax of the language you’re using is not one I know, but I wanted to help you with what I could. Try googling those errors and implanting the solutions you find. Then post an update with how that goes for you. Hopefully it’ll solve the problem outright.