```java
import java.util.Scanner;
public class IntReceiver {
int temp;
public int getValue() {
Scanner in = new Scanner(System.in);
System.out.printf("input an integer:");
temp = in.nextInt();
while (temp < 0 || temp > 100) {
System.out.printf("invalid input!");
temp = in.nextInt();
}
return temp;
}
}
class Test{
public static void main(String[] args)
{
IntReceiver ir = new IntReceiver();
int value;
value = ir.getValue();
System.out.printf("The value is "+value);
}
}
```