cardsPin is never accessed in Login
7 super(cardNum, pin);
8 }
9
10 private static String cardsPin;11 private static String cardsNum;
12 private static int attempts = 0;
13
cardsNum is never accessed in Login
8 }
9
10 private static String cardsPin;
11 private static String cardsNum;12 private static int attempts = 0;
13
14 private static boolean isCardValid(String cardNum) throws SQLException {
Description
A private field which is not referenced anywhere in this file was detected.
Such a field is useless and can be safely removed.
Bad Practice
class SomeClass {
private int unused; // Not used anywhere within `SomeClass`.
// ...
}
Recommended
Remove the field if is is not used anywhere. If the field was meant to be inherited, mark it as protected
instead.
class SomeClass {
protected int usedInSubclass;
// ...
}