So I've recently been learning java and have been using www.javacoffeebreak.com for my first tutorial, anyway everything's been going smoothly til I get to here: http://javacoffeebreak.com/java102/java102.html
The code that's giving me that error is the following:
public class Account
{
protected double balance;
// Constructor to initialize balance
public Account( double amount )
{
balance = amount;
}
// Overloaded constructor for empty balance
public Account()
{
balance = 0.0;
}
public void deposit( double amount )
{
balance += amount;
}
public double withdraw( double amount )
{
// See if amount can be withdrawn
if (balance >= amount)
{
balance -= amount;
return amount;
}
else
// Withdrawal not allowed
return 0.0;
}
public double getbalance()
{
return balance;
}
}
Anyone see what I'm doing wrong? Thanks in advance.