13 Replies - 3578 Views - Last Post: 09 April 2011 - 07:51 AM Rate Topic: -----

#1 cristinak102992  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 08-April 11

Java cannot find symbol - method displayInfo() error

Posted 08 April 2011 - 05:19 PM

Hello,

I'm somewhat of an newbie when java programming and would appreciate some help with the code below. This class is part of a banking system code and comes up with an error (within the switch case1) that displays "cannot find symbol - method DisplayInfo()" error. I've tried to solve this error, but I'm stuck and need some help. I know that sometimes this error comes up when something is accidentally spelled wrong, but I double checked all of the code and couldn't find an error in relation to this.

import java.util.Scanner;

public class ATM
{
    static Scanner scan = new Scanner(System.in);
    private static int choice;
    private String Name;
    private int birthday;
    private int AccountSocial;
    private static String AccountName;
    private String day, month, year;
    
    
    public static void main (String[] args)
    {
        
        Bank a = new Bank();
        Transaction t = new Transaction();
        
   
        printMenu();
        choice = scan.nextInt();
        
        
     if(a.getAccountCount() < a.getAccountCapacity())
     {
        while(choice !=7)
        {
            menuChoice(choice);
            printMenu();
            choice = scan.nextInt();
        }
        
     if(choice == 7)
     menuChoice(7);
    }
    else
        while(choice !=6)
        {
            menuChoice2(choice);
            printMenu();
            choice = scan.nextInt();
        }
        
     if(choice == 6)
     menuChoice2(6);    
    }
        
    
    
//Menu

        
        public static void printMenu()
    {
        System.out.println("   What would you like to do?   ");
        System.out.println("2.  Deposit Money.                ");
        System.out.println("3.  Withdraw Money.               ");
        System.out.println("4.  Display Balance.              ");
        System.out.println("5.  Display Last transaction info.");
        System.out.println("6.  Create a new bank accountount.");
        System.out.println("7.  Quit.                         ");
    }
        

        
        
//Switch Method used for menu

    public static void menuChoice(int choice)
    {
        switch(choice)
        {   
            case 1:
            
            System.out.println("Which account would you like to alter?");
            int i = scan.nextInt();
            DisplayInfo();
            break;
            
            case 2:
            System.out.println("How much money would you like to deposit?");
            double x = scan.next();

            break;
            
            case 3:
            System.out.println("How much money would you like to withdraw?");
            x = scan.next();
            b.withdraw(x, a, B)/>;
            break;
            
            case 4:
            b.getAccountBalance();
            break;
            
            case 5:
            b.getLastTrans(B)/>;
            break;
            
            
            case 6:
            setCreDate();
            System.out.println("We will need some information from you before "+
                               "we create\n this bount.");
            System.out.println("What year were you born in?  (0000) ");
            year = scan.next();
            System.out.println("What month were you born in?  (00) ");
            month = scan.next();
            System.out.println("What day were you born in?  (00) ");
            day = scan.next();
            setBirth(day, month, year);
            setSocial();
            System.out.println();
            a.addToBank(getCreDate(), getSocial(), getBirth());
            break;
            
            case 7:
            System.out.println("Have a nice day.");
            System.exit(0);
            break;
        }
    }
    
    public static void menuChoice2(int choice)
    {
        switch(choice)
        {   
            case 1:
            a[b].DisplayInfo();
            break;
            
            case 2:
            System.out.println("How much money would you like to deposit?");
            double x = scan.nextDouble();
            b.deposit(x, a, B)/>;
            break;
            
            case 3:
            System.out.println("What amount would you like to withdraw?");
            x = scan.nextDouble();
            a.withdraw(x, a, B)/>;
            break;
            
            case 4:
            a.getAccountBalance();
            break;
            
            case 5:
            a.getLastTrans(B)/>;
            break;
           
            
            case 6:
            System.out.println("Have a nice day.");
            System.exit(0);
            break;
        }
    }
    
    
}





^The code above has the issue. The code sections below are in relation to this one.


import java.util.Scanner;

public class Account
{
    Scanner scan = new Scanner(System.in);
    String AccountName;
    int AccountNumber;
    double AccountBalance;
    String AccountBirth;
    String AccountSocial;
    String lastChange;
    double lastAmount;
    String day, month, year;
    String soc1, soc2, soc3;
    String creationDate;
    int socT1 = 3;
    int socT2 = 2;
    int socT3 = 4;
    boolean fail = false;
    
    // Transactions
    private Transaction[] Account;
    final int transactionCapacity = 10;
    private int transactionCount = 0;

    //////////////////////////////////////////////////////////////////////////////////
    /////////////////////////   Constructor   ////////////////////////////////////////
    //////////////////////////////////////////////////////////////////////////////////
    public Account()
    {
        AccountNumber = (int) (Math.random() * Integer.MAX_VALUE);
        AccountBalance = 0.0;
        creationDate = null;
        AccountSocial = null;
        
        //Transactions        
        Account = new Transaction[transactionCapacity];
    }
    
    public Account(String Date, String Social, String Birth)
    {
        AccountNumber = (int) (Math.random() * Integer.MAX_VALUE);
        AccountBalance = 0.0;
        creationDate = Date;
        AccountSocial = Social;
        
        // Transactions
        Account = new Transaction[transactionCapacity];
    }

    
    //////////////////////////////////////////////////////////////////////////////////
    ///////////////////////////  Add to Account  /////////////////////////////////////
    //////////////////////////////////////////////////////////////////////////////////
    public void addToAccount(String lastAmount, String lastChange, String date)
    {
        Account[transactionCount] = new Transaction();
        Account[transactionCount].setAmount(lastAmount);
        Account[transactionCount].setType(lastChange);
        Account[transactionCount].setDate(date);
        if (transactionCount < 8)
            transactionCount++;
        else
            transactionCount = 0;
    }
    
    
    //////////////////////////////////////////////////////////////////////////////////
    /////////////////////////    Withdraw   //////////////////////////////////////////
    //////////////////////////////////////////////////////////////////////////////////
    public void withdraw(String amount, Account a)
    {
        int changeAmount = Integer.parseInt(amount);
        if (AccountBalance-50 >= changeAmount)
            {
                subBalance(changeAmount);
                a.addToAccount(amount, "withdraw", getCurDate());
                
                System.out.println("You currently have "+ getAccountBalance() +
                                   " dollars in your  ");
            }
        else
            System.out.println("Insufficient funds");
          
    }
    
    
    
    
    //////////////////////////////////////////////////////////////////////////////////
    /////////////////////////   Deposit   ////////////////////////////////////////////
    //////////////////////////////////////////////////////////////////////////////////
    public void deposit(String amount, Account a)
    {
        int changeAmount = Integer.parseInt(amount);
        addBalance(changeAmount);
        a.addToAccount(amount, "deposit", getCurDate());
        
        System.out.println("You currently have "+ getAccountBalance() +
                                   " dollars in your  ");
        
    }
    
    
    
    
    
    
    //////////////////////////////////////////////////////////////////////////////////
    /////////////////////////   Change money   ///////////////////////////////////////
    //////////////////////////////////////////////////////////////////////////////////
    public double addBalance(double newBal)
    {
        AccountBalance += newBal;
        return AccountBalance;
    }
    
    public void subBalance(double newBal)
    {
        AccountBalance -= newBal;
    }
    
    
    
    
    
    
    
    
    
    
    //////////////////////////////////////////////////////////////////////////////////
    ////////////////////////   Social Security       /////////////////////////////////
    //////////////////////////////////////////////////////////////////////////////////
    
    public String getSocial()
    {
        return AccountSocial;
    }
    
    
    public void setSocial()
    {
        do
        {
        System.out.println("Please enter your Social Security Number (xxx xx xxxx)");
        soc1 = scan.next();
        int a = soc1.length();
        soc2 = scan.next();
        int b = soc2.length();
        soc3 = scan.next();
        int c = soc3.length();
        
        if(a == 3)
        {
            if(b == 2)
            {
                if(c == 4)
                {
                    AccountSocial = (soc1 +"-"+ soc2 +"-"+ soc3);
                    break;
                }
                else
                {
                    System.out.println("Invalid input");
                    fail = true;
                }
            }
            else
            {
                System.out.println("Invalid input");
                fail = true;
            }
        }
        else
        {
            System.out.println("Invalid input");
            fail = true;
        }
        
    }
    while (fail = true);
}    
    
    
    
    
    


/////////////////////////////////////////////////////////////////////////////////
///////////////////////   Account Number         /////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////
    public int getAccountNumber()
    {
        return AccountNumber;
    }
    
    
    
    
/////////////////////////////////////////////////////////////////////////////////
///////////////////////   Date     //////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////
    public String getBirth()
    {
        return AccountBirth;
    }
    
    public void setBirth(String day, String month, String year)
    {
        day = day;
        month = month;
        year = year;
        AccountBirth = day +"/"+ month +"/"+ year;
    }
    
    
    
    public String getCreDate()
    {
        return creationDate;
    }
    
    public String getCurDate()
    {
        return creationDate;
    }
    
    public void setCreDate()
    {
        System.out.println("What is the current date? (ex: 02 05 1984)");
        day = scan.next();
        month = scan.next();
        year = scan.next();
        creationDate = (day +"/"+month+"/"+year);
    }
    ////////////////////////////////////////////////////////////////////////////////////////
    
    
    
    
    
/////////////////////////////////////////////////////////////////////////////////
///////////////////////   Gets Balance          /////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////
    
    public double getAccountBalance()
    {
        return AccountBalance;
    }
    
    
    
/////////////////////////////////////////////////////////////////////////////////    
///////////////////////  Checks to see if 2 accounts are equal  /////////////////
/////////////////////////////////////////////////////////////////////////////////


    public boolean equals(Account B)/>
    {
        if (b.AccountNumber == this.AccountNumber)
            return true;
        else
            return false;
    }
    
    
/////////////////////////////////////////////////////////////////////////////////
///////////////////////   Display Account Info  /////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////
    public void DisplayInfo()
    {
        System.out.println("Your social security is: "+getSocial());
        System.out.println("You were born on: "+getBirth());
        System.out.println("Account Number: "+getAccountNumber());
        System.out.println("You currently have $"+getAccountBalance()+" in your bank right now.");
        System.out.println("The account was created on: "+getCreDate());
    }




}




import java.util.ArrayList;
public class Bank
{
    private int accountCount;
    private int accountLimit;
    private int accountCapacity;
    private Account[] Bank;
    String BankName;
    
    
    /////////////////////////////////////////////////////////////////////////
    ///////////////////////   Constructor ///////////////////////////////////
    /////////////////////////////////////////////////////////////////////////
    public Bank()
    {
        accountCapacity = 10;
        accountCount = 0;
        Bank = new Account[accountCapacity];
        BankName = "Charter";
    }
    
    
    /////////////////////////////////////////////////////////////////////////
    ///////////////  Adds an Account to the Bank  ///////////////////////////
    /////////////////////////////////////////////////////////////////////////
    public void addToBank(String date, String SSN, String birth)
    {
        Bank[accountCount] = new Account(date, SSN, birth);
        accountCount++;
    }
    
    
    /////////////////////////////////////////////////////////////////////////
    /////////////////// Displays bank info  /////////////////////////////////
    /////////////////////////////////////////////////////////////////////////
    
    public void dispInfo(String bankName, Account number)
    {
        System.out.println("This bank is named: "+bankName);
        number.getAccountNumber(); 
    }
    
    
    /////////////////////////////////////////////////////////////////////////
    ////////////////////// Returns the Bank Account  ////////////////////////
    /////////////////////////////////////////////////////////////////////////
    public Account getBankAccount(int i)
    {
        return Bank[i];
    }
    
    
    public int getAccountCount()
    {
        return accountCount;
    }
    
    public int getAccountCapacity()
    {
        return accountCapacity;
    }
    
}
    



public class Transaction
{
    String lastAmount;
    String lastChange;
    String date;
    
       
    public Transaction()
    {
        lastAmount = null;
        lastChange = null;
        date = null;
    }
    
    public String getAmount()
    {
        return lastAmount;
    }
    
    public String getType()
    {
        return lastChange;
    }
    
    public String getDate()
    {
        return date;
    }
    
    public void setAmount(String newAmount)
    {
        lastAmount = newAmount;
    }
    
    public void setType(String newType)
    {
        lastChange = newType;
    }
    
    public void setDate(String newDate)
    {
        date = newDate;
    }
    
    public String toString()
    {
        return "Last transaction info: Type: " + lastChange + " Amount: $" + lastAmount + " Date: " + date;
    }
    
    
    
    
    
}



Is This A Good Question/Topic? 0
  • +

Replies To: Java cannot find symbol - method displayInfo() error

#2 Greltam  Icon User is offline

  • D.I.C Head

Reputation: 90
  • View blog
  • Posts: 225
  • Joined: 29-January 09

Re: Java cannot find symbol - method displayInfo() error

Posted 08 April 2011 - 05:51 PM

You need to call DisplayInfo() from an Object of the Account Class.
Was This Post Helpful? 1
  • +
  • -

#3 softwareEngineer()  Icon User is offline

  • D.I.C Head

Reputation: -28
  • View blog
  • Posts: 247
  • Joined: 08-April 11

Re: Java cannot find symbol - method displayInfo() error

Posted 08 April 2011 - 05:55 PM

Yes, I do remember my first time trying to access a field outside of the same class as I was using.

This is what I think will be a simple problem based on what I am seeing above.

You declared dispInfo(bankname, number) in the class Bank, but you are accessing it from ATM, which means you must tell the compiler where you declared the function (SEE BELOW). Not only this, but you are not giving any paramaters, and you're are calling it DisplayInfo(), which is not what you called it before.

So what do you need to fix?

  • Access dispInfo() using Bank.dispInfo(String bankname, Account number)
  • Make sure you are using the correct name of the method
  • Make sure your parameters have the correct variables filling them


After this, you should have a program that says, "Java Cannot Find Symbol" no more!

(Please rate this post. If there are any more problems, tell me)

This post has been edited by softwareEngineer(): 08 April 2011 - 05:56 PM

Was This Post Helpful? 0
  • +
  • -

#4 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8332
  • View blog
  • Posts: 31,857
  • Joined: 06-March 08

Re: Java cannot find symbol - method displayInfo() error

Posted 08 April 2011 - 06:25 PM

In a problem like yours, the main() method which should be the ONLYEST static method in your class should be

public static void main(String[] args) {
  new ATM();
}



after that, everything should happen in the ATM class and nothing should be static
Was This Post Helpful? 0
  • +
  • -

#5 Greltam  Icon User is offline

  • D.I.C Head

Reputation: 90
  • View blog
  • Posts: 225
  • Joined: 29-January 09

Re: Java cannot find symbol - method displayInfo() error

Posted 08 April 2011 - 06:29 PM

agreed PBL, Static is a broken crutch.
Was This Post Helpful? 1
  • +
  • -

#6 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8332
  • View blog
  • Posts: 31,857
  • Joined: 06-March 08

Re: Java cannot find symbol - method displayInfo() error

Posted 08 April 2011 - 06:35 PM

View PostGreltam, on 08 April 2011 - 08:29 PM, said:

agreed PBL, Static is a broken crutch.

Thanks Greltam. Actually the problem is that, badly teached, the main() class is there to fire an Object Oriented program because it is the only outside access to the class. After that everything should be OO :)

Every class should have a main() class for unit testing but never real processing should happen into it
Was This Post Helpful? 0
  • +
  • -

#7 cristinak102992  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 08-April 11

Re: Java cannot find symbol - method displayInfo() error

Posted 08 April 2011 - 08:02 PM

View PostsoftwareEngineer(), on 08 April 2011 - 05:55 PM, said:

Yes, I do remember my first time trying to access a field outside of the same class as I was using.

This is what I think will be a simple problem based on what I am seeing above.

You declared dispInfo(bankname, number) in the class Bank, but you are accessing it from ATM, which means you must tell the compiler where you declared the function (SEE BELOW). Not only this, but you are not giving any paramaters, and you're are calling it DisplayInfo(), which is not what you called it before.

So what do you need to fix?

  • Access dispInfo() using Bank.dispInfo(String bankname, Account number)
  • Make sure you are using the correct name of the method
  • Make sure your parameters have the correct variables filling them


After this, you should have a program that says, "Java Cannot Find Symbol" no more!

(Please rate this post. If there are any more problems, tell me)


Hello,

I followed your advice and entered your suggestion into my code, but I still have an error message. This time it says, " ')' expected"....

import java.util.Scanner;

public class ATM
{
    static Scanner scan = new Scanner(System.in);
    private static int choice;
    private String Name;
    private int birthday;
    private int AccountSocial;
    private static String AccountName;
    private String day, month, year;
    
    
    public static void main (String[] args)
    {
        
        Bank a = new Bank();
        Transaction t = new Transaction();
        
   
        printMenu();
        choice = scan.nextInt();
        
        
     if(a.getAccountCount() < a.getAccountCapacity())
     {
        while(choice !=7)
        {
            menuChoice(choice);
            printMenu();
            choice = scan.nextInt();
        }
        
     if(choice == 7)
     menuChoice(7);
    }
    else
        while(choice !=6)
        {
            menuChoice2(choice);
            printMenu();
            choice = scan.nextInt();
        }
        
     if(choice == 6)
     menuChoice2(6);    
    }
//Menu     
        public static void printMenu()
    {
        System.out.println("   What would you like to do?   ");
        System.out.println("2.  Deposit Money.                ");
        System.out.println("3.  Withdraw Money.               ");
        System.out.println("4.  Display Balance.              ");
        System.out.println("5.  Display Last transaction info.");
        System.out.println("6.  Create a new bank accountount.");
        System.out.println("7.  Quit.                         ");
    }
//Switch Method used for menu

    public static void menuChoice(int choice)
    {
        switch(choice)
        {   
            case 1:
            
            System.out.println("Which account would you like to alter?");
            int i = scan.nextInt();
            Bank.dispInfo(String bankName, Account number);
            break;
            
            case 2:
            System.out.println("How much money would you like to deposit?");
            double x = scan.next();

            break;
            
            case 3:
            System.out.println("How much money would you like to withdraw?");
            x = scan.next();
            b.withdraw(x, a, B)/>;
            break;
            
            case 4:
            b.getAccountBalance();
            break;
            
            case 5:
            b.getLastTrans(B)/>;
            break;
            
            
            case 6:
            setCreDate();
            System.out.println("We will need some information from you before "+
                               "we create\n this bount.");
            System.out.println("What year were you born in?  (0000) ");
            year = scan.next();
            System.out.println("What month were you born in?  (00) ");
            month = scan.next();
            System.out.println("What day were you born in?  (00) ");
            day = scan.next();
            setBirth(day, month, year);
            setSocial();
            System.out.println();
            a.addToBank(getCreDate(), getSocial(), getBirth());
            break;
            
            case 7:
            System.out.println("Have a nice day.");
            System.exit(0);
            break;
        }
    }
    
    public static void menuChoice2(int choice)
    {
        switch(choice)
        {   
            case 1:
            a[b].DisplayInfo();
            break;
            
            case 2:
            System.out.println("How much money would you like to deposit?");
            double x = scan.nextDouble();
            b.deposit(x, a, B)/>;
            break;
            
            case 3:
            System.out.println("What amount would you like to withdraw?");
            x = scan.nextDouble();
            a.withdraw(x, a, B)/>;
            break;
            
            case 4:
            a.getAccountBalance();
            break;
            
            case 5:
            a.getLastTrans(B)/>;
            break;
           
            
            case 6:
            System.out.println("Have a nice day.");
            System.exit(0);
            break;
        }
    }
    
    
}


Thank you for your help it is greatly appreciated ! :)
Was This Post Helpful? 0
  • +
  • -

#8 softwareEngineer()  Icon User is offline

  • D.I.C Head

Reputation: -28
  • View blog
  • Posts: 247
  • Joined: 08-April 11

Re: Java cannot find symbol - method displayInfo() error

Posted 08 April 2011 - 09:02 PM

I will be able to answer your question tomorrow, as I am a little tied up right now. Don't forget to give me a plus!!!
Was This Post Helpful? 1
  • +
  • -

#9 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10565
  • View blog
  • Posts: 39,103
  • Joined: 27-December 08

Re: Java cannot find symbol - method displayInfo() error

Posted 08 April 2011 - 09:18 PM

Post your exact error message from the compiler, including line numbers.
Was This Post Helpful? 0
  • +
  • -

#10 cristinak102992  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 08-April 11

Re: Java cannot find symbol - method displayInfo() error

Posted 08 April 2011 - 09:52 PM

View Postmacosxnerd101, on 08 April 2011 - 09:18 PM, said:

Post your exact error message from the compiler, including line numbers.


The syntax error is in line 069 in the code above. The error is " ')' " expected. I greatly appreciate any help ! :)
Was This Post Helpful? 0
  • +
  • -

#11 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10565
  • View blog
  • Posts: 39,103
  • Joined: 27-December 08

Re: Java cannot find symbol - method displayInfo() error

Posted 08 April 2011 - 10:01 PM

Your error is at this line. A few things here. First, dispInfo() is non-static. You must invoke it off of a Bank object, not the class. Second, you only declare the types when you define the method. You should invoke it passing String and Account variables instead.
Bank.dispInfo(String bankName, Account number);  



More like: myBank.dispInfo("Wachovia", myAccount);.
Was This Post Helpful? 1
  • +
  • -

#12 cristinak102992  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 08-April 11

Re: Java cannot find symbol - method displayInfo() error

Posted 09 April 2011 - 05:49 AM

View Postmacosxnerd101, on 08 April 2011 - 10:01 PM, said:

Your error is at this line. A few things here. First, dispInfo() is non-static. You must invoke it off of a Bank object, not the class. Second, you only declare the types when you define the method. You should invoke it passing String and Account variables instead.
Bank.dispInfo(String bankName, Account number);  



More like: myBank.dispInfo("Wachovia", myAccount);.


Could you elaborate a little more on this? I've tried to correct my code with your suggestion for some time and it still will not work. Thank you for your time. :)
Was This Post Helpful? 0
  • +
  • -

#13 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10565
  • View blog
  • Posts: 39,103
  • Joined: 27-December 08

Re: Java cannot find symbol - method displayInfo() error

Posted 09 April 2011 - 06:31 AM

This is what I mean:
BankAccount b = new BankAccount();
Account someAcct = new Account();
b.dispInfo("somename", someAcct);



Also, a couple other things in your Account class. First, no need for Scanner in it. You should not be getting user input in your Account class. Second, not good practice to name your Transaction[] variable the same thing as your class. It's sure to cause confusion down the road.
Was This Post Helpful? 2
  • +
  • -

#14 softwareEngineer()  Icon User is offline

  • D.I.C Head

Reputation: -28
  • View blog
  • Posts: 247
  • Joined: 08-April 11

Re: Java cannot find symbol - method displayInfo() error

Posted 09 April 2011 - 07:51 AM

What Macosxnerd is saying is what I implied before, but I am now guessing you never read the Java Tutorials.

In order to use this function, you must have variables already that you are going to manipulate. What this means is that, when you declared the function, you would be using the string variable and the Account class instance. I am not sure if this is what you meant to do.

So, in your class with the declaration of disInfo(String, Account), you might want to change the Account part of the parameters to just an integer; what I think you are trying to do is just take an account number and print it to the screen, right?

Next, make sure in the body of the function that you have things that are manipulating the String, and what I hope you will change to an integer.

For example:

//all other code is above, this is in the Bank class
          //this changes the dipInfo(String, Account)

public void dispInfo(String bankName, int accountNumber)
{
Account number = new Account();
//create a new Account, so use for this function only
System.out.println("This bank is named: "+bankName); 
accountNumber = number.getAccountNumber();
System.out.prontln("Your account number is: " +accountNumber);
}



Now, when using the function, do NOT just put String bankName and int accountNumber in the parameters! Do something like the following when invoking it:

//....
String nameOfTheBank = "Chase";
int theAccountNumber = null;
//note these variables can be named anything

//.....

Bank.dispInfo(nameOfTheBank, theAccountNumber);



I think this is what you are trying to do. Oh yea, and:

if (I helped you)
{
Press the plus button under my post()
}


This post has been edited by softwareEngineer(): 09 April 2011 - 07:54 AM

Was This Post Helpful? 2
  • +
  • -

Page 1 of 1