0
CreditCard.java:180: error: cannot find symbol
} while (cardNum7 != 0);
^
symbol: variable cardNum7
location: class CreditCard
1 error
Process javac exited with code 1
代碼:
do {
//Declarations
long cardNum7 = 0;
//testing
System.out.print("Enter a card number (type 0 to end program): ");
cardNum7 = keyboard.nextLong();
System.out.println("Your credit card is " + isValid(cardNum7));
} while (cardNum7 != 0);