Coding Fun Java Creating and using a simple BankAccount class in Java

Creating and using a simple BankAccount class in Java





This video demonstrates how to create a simple BankAccount class in java. It also shows an example of how to create a couple of objects from this class.

Tags: , , , , , , , ,

9 thoughts on “Creating and using a simple BankAccount class in Java”

  1. plz tells about how to creat saving and current account in java plz urgent

  2. can you please put the program code in the link

  3. RSJC JOE says:

    Can we do it with Inheritance ??

  4. s1098451 says:

    The deposit method simply adds the parameter amount to the current balance.

    balance = balance + amount

    So if the balance is currently $100 and amount is $15 then:

    balance = 100 + 15

    You can also add a constructor to initialise the BankAccount when it is created, so somewhere in the BankAccount class:

    public BankAccount(double openingBalance){
    balance = balance + openingBalance;
    }

    Then you could do this in TransactionManager:

    BankAccount sally = new BankAccount(100);

    Hope that helps.

  5. But what if you had initial Bank Account values and had to deposit some amount money? What would you do then?

  6. Nice Tutorial thank you very much

  7. 540135 says:

    You need to do a voice over explaining what you are implementing to make it work,

Leave a Reply

Your email address will not be published. Required fields are marked *