This week's book giveaway is in the OCP forum.
We're giving away four copies of OCP Java SE 8 Programmer II Exam Study Guide and have Kathy Sierra, Bert Bates, & Elizabeth Robson on-line!
See this thread for details.
Win a copy of OCP Java SE 8 Programmer II Exam Study Guide this week in the OCP forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Why doesnt this work? constructor undefined  RSS feed

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
line: 5]
Error: The constructor Stock1(java.lang.String, java.lang.String, double, double) is undefined

 
village idiot
Bartender
Posts: 1214
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What would happen if you changed the name of your Stock1 class that defined the constructors to something else, and then created that object in main in your Stock1 class?
 
Ranch Hand
Posts: 161
Firefox Browser Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Carol, Double posting.

Gary
 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
More like this;

 
Sheriff
Posts: 21289
87
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Gary Ba wrote:Carol, Double posting.

Gary


Indeed.

Jimmy, please UseOneThreadPerQuestion. This thread is the same as this one. I'll close the other one, but do read Matthew's post in it.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!