Gary Ba wrote:You did not take out the else statement inside the loop.
Gary Ba wrote:Try taking out the else statement outside the loop.
like..
for ...
{
do stuff
}
if password has been entered 3 times incorrectly,
print message.
Good luck,
Gary
Mina Daoud wrote:Can you please check your condition and loop scope!
Rob Prime wrote:System.in is now pointing to a text file that apparently only has one line. To read from both the file and the console use "new Scanner(new File("D:/Java/test.txt"))" as well as "new Scanner(System.in)". This will give you two Scanner objects. You currently don't; filePass and inputPass are not Scanner objects but Strings, and keyboard is your only Scanner object.
pete stein wrote:
Behrouz Hosseini wrote:
Are you sure you want to reassign the standard input stream? I'll answer this for you: you really don't want to do this.