Create a program that requests two integer values A, B by keyboard and then shows in screen the sum of all even numbers greater than A and less than B. It must be validated that the number B is greater than the number A, otherwise the numbers must be requested again when user.
In eclipse or in any other program that uses java language.
This is what I have tried so far:
public class error {
int a;
int b;
public void valor1(){
for(int i=0;i>a;i++){
if(i>a){
}
}
}
}