guyzzz,,,help,,i dont know how to call a variable from other class,,could you help me,,huhuhuh,,,i really need your help...
i have a class,,
this is just a summary...
public class BankAccount{
int accountNumber[] = {1234, 2345};
public class ATM{
BankAccount bank = BankAccount();
String accountNum;
int accountNum2;
accountNum = JOptionPane.showInputDialog("Please enter your account number: ");
accountNum2 = Integer.parseInt(accountNum);
if(accountNum==bank.accountNumber[0]){
JOptionPane.showMessageDialog(null, "Card Accepted.");
}else{
JOptionPane.showMessageDialog(null,"Card is not valid.");
there is no error but when i run it,,,i dont know,,but the eclipse dont read the bank.accountNumber[0].. and prints the ("Card is not valid.")..
i dont know what to do...
help........