Search Results

Search found 1 results on 1 pages for 'user1746605'.

Page 1/1 | 1 

  • Keep getting error class, interface, or enum expected

    - by user1746605
    I can't see the problem with this short class. I get 8 class, interface, or enum expected errors. Thanks public class BankAccount { public BankAccount { private double balance = 0; } public BankAccount(double balanceIn) { private double balance = balanceIn; } public double checkBalance { return balance; } public void deposit(double amount) { if(amount > 0) balance += amount; } public void withdraw(double amount) { if(amount <= balance) balance -= amount; } }

    Read the article

1