Overloading Java function with List<> parameter

前端 未结 6 1276
猫巷女王i
猫巷女王i 2021-02-02 15:19

I have 2 classes

public class Customer{
  ...
  public String getCustomerNumber();
  ...
}

public class Applicant{
   ....
   private Customer c;
   public Cust         


        
6条回答
  •  隐瞒了意图╮
    2021-02-02 15:40

    Before coming into the method names , the class hierarchy is little bit confusing...

    public class Customer{          
      ...          
      public String getCustomerNumber();          
      ...          
    }          
    
    public class Applicant{          
       ....          
       private Customer c;          
       public Customer getCustomer(){ return c; }          
       ...          
    }    
    

    Why should applicant and Customer be different objects ? Can you tell the relation between these objects ?

提交回复
热议问题