do while (variable != type)
Having a problem here. I wanted to make the segment of code repeat until a basic condition was met, type. As you can see below, I try just that, however, it won't let me create a condition based on type. Why? How do I get around this? I checked a couple resources on this and all I could find were examples based on a basic counter system.
Here's the code:
String settingAccountNumber =
JOptionPane.showInputDialog( null, "Please enter your account number: "); // Get input
int i = Integer.parseInt( settingAccountNumber ); // Translate string to "int"
} while ( i != int);
Basically, I'm trying to follow along with a project inside the book by creating a basic functioning ATM machine. The section that talks about while and do while doesn't say anything about basing them off type. I assumed either it was an advanced lesson or it didn't exist.