I have been trying to implement a function that returns an int from 0 to range. I have implemented the code to get an integer in the first place put don't know how to loop this in with the range part.
public int get_input_int(int range){
Scanner int_reader = new Scanner(System.in);
String current_input = int_reader.next();
while(!int_reader.hasNextInt()){
current_input = int_reader.next();
}
if(Integer.valueOf(current_integer) > 0 && Integer.valueOf(current_integer) < range){
return current_input
}
return current_input;
}