+ 2

Java code question

How do I change: } else if(dia == 2) { foamwidth = dia12; dia == 2 to be able to have the 2 as a range? ex. if dia == 2-5 (2, 3, 4, or 5) But I want to use it for more than just a few numbers, and I didn't want to type each individual number, just use a range somehow?

1st Jan 2019, 9:44 AM
Dustin James Locey
Dustin James Locey - avatar
2 Answers
+ 3
if (dia >= 2 && dia <= 5)
1st Jan 2019, 9:57 AM
ShortCode
+ 1
Gotcha, thank you very much :)
1st Jan 2019, 10:13 AM
Dustin James Locey
Dustin James Locey - avatar