Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

2 identically structured beans and 2 identically structured getter statements  RSS feed

 
John Piper
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have two beans that are structured exactly the same. I pull both those beans into the same java class the exact same way. Yet only one of them has a problem.

Here is the error when I try to build it:

cannot find symbol
symbol : constructor BalanceBean(java.lang.String)
location: class HWpackage.BalanceBean


Here is the working bean, UserBean2


And here is the working getter statements:



Now compare that to the non-working code.

BalanceBean:


And its getter statements:


For what ever reason "BalanceBean" on line 3 is causing all the problems.

Can someone please tell me why?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66203
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're not looking very close. The error message is telling you exactly what is wrong.

Look at the constructor and look at how you are calling it.
 
Nico Van Brandt
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The error is pretty obvious

cannot find a constructor with signature BalanceBean(String)
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!