System.out.printIn()不能处理我的代码

时间:2017-01-24 22:05:33

标签: java

它向我显示“无法找到符号方法printIn(java.lang.string) 请问是什么错误,我使用了3种不同的IDES。 System.out.printIn()

有什么问题
    public class Account
    {
    private String owner;
    private int balance;

    public Account (String name)
    {
        owner = name;
        balance = 0;
    }  
    public void deposit(int anAmount)
    {
        balance += anAmount;
    }
    public int withdraw(int anAmount)
    {
        int amountWithdrawn;
        if (anAmount <= balance )
            amountWithdrawn = anAmount;
        else
            amountWithdrawn = balance;

        balance -= amountWithdrawn;

        return amountWithdrawn;
    }

    public void print()
    {
        System.out.printIn("Owner =" + owner +"    Balance=" +   balance);
    }


}

1 个答案:

答案 0 :(得分:1)

那不是printIn()。您为Ikea键入了字母I

println()您必须使用字母l作为lima