Java Inheritance: Method set(List) not applicable for arguments ArrayList -
I am getting an error in the following.
Hierarchy: General Budget - -> RRBTB These figures include the following hierarchy: General Budget ArrayBan - & gt; RRBudgetYearBean Parent Category - GeneralBudgetBean.java Extension class - RRBudgetBean.java Error: from the tutorial (): In that case, you must change the method signing to That article may be useful about wildcards.
// Data from a member list & lt; GeneralBudgetYearBean & gt; BudgetYearBeans; // gates / satars public list & lieutenant; GeneralBacketYireBan & gt; GetBudgetYearBeans () {return budget YEARBeans; } Public Zero SetBizTirebusiness (List & Lieutenant; GeneralBacketWirebans> Budget Yearbains) {this.budgetYearBeans = budgetYearBeans; }
Public category RRBudgetBean extends GeneralBudgetBean {// ... public zero initRRBudgetBean ( ) {this.setBudgetYearBeans (New Arlist & lt; RRBudgetYearBean & gt; ()); }}
GeneralBudgetBean argument in type setBudgetYearBeans (list of GeneralBudgetYearBean & gt;) ArrayList & lt is not applicable; RRBudgetYearBean & gt; In other words, the error is:
Method method (the list of the & lt; bean & gt;) argument ArrayList & lt is not applicable; SubBean & gt;
box & lt; Integer & gt; and
from the box & lt; Double & gt; is not
box & lt subtype; Number & gt;
public zero setBudgetYearBeans (list?) GeneralBudgetYearBean & gt; Expands budgetYearBeans ) {This.budgetYearBeans = budgetYearBeans; }
Comments
Post a Comment