jeudi 5 mars 2015

I have a java midterm due tomorrow, and my if...else statements get skipped entirely

My program is supposed to take input from the user, and spit out the input, plus the net pay, and I have the validation in if...else statements, but they get skipped entirely, not even the else executes.



while (DataEntered1)
{
System.out.println("What is the employee ID?");
IdNumber=keyboard.nextLine();
keyboard.nextLine();

if (IdNumber.equals(null))
{....}else{System.out.println("Please enter an id and try again");

Aucun commentaire:

Enregistrer un commentaire