Incompatible return type error java

后端 未结 5 1488
礼貌的吻别
礼貌的吻别 2021-01-17 06:52
class BankAccount {
    private String firstname;
    private String lastname;
    private int ssn;
    private int accountnumber = 0;
    private double accountbala         


        
5条回答
  •  广开言路
    2021-01-17 07:29

    public void setAccountNumber(int accountnumber) {
     return accountnumber;
     }
    

    here your return type is void and your returning int.

提交回复
热议问题