External Exam Download Resources Web Applications Games Recycle Bin

higher Or Lower



setup Form
Higher or Lower jFrame Form
import Package
import java.util.Random;

public Variable And Constructor

btnGuess
int human_guess;
human_guess = Integer.valueOf(txtGuess.getText());
        
if(human_guess == computer_guess){
	lblFeedback.setText("correct");
}

if(human_guess > computer_guess){
	lblFeedback.setText("lower");
}

if(human_guess < computer_guess){
	lblFeedback.setText("higher");
}