Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java check if number is in range

//--- If Statement --//
        
        int num = 5;
        
        //random values; can be changed
        int a = 3;
        int b = 7;
        
        if (num >= 3 && num <= 7) {
            //Your Code Here
        }
        
//================

//--- Boolean Variable --//

        int num = 5;

        //random values; can be changed
        int a = 3;
        int b = 7;

        boolean isInRange = num >= a && num <= b;
 
PREVIOUS NEXT
Tagged: #java #check #number #range
ADD COMMENT
Topic
Name
1+9 =