Bookmark Topic Watch Topic
  • New Topic

Why doesnt this work? constructor undefined  RSS feed

 
jimmy dean
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Report post to moderator
line: 5]
Error: The constructor Stock1(java.lang.String, java.lang.String, double, double) is undefined
 
Matthew Brown
Bartender
Posts: 4568
9
  • Likes 2
  • Mark post as helpful
  • send pies
  • Report post to moderator
You're really declaring two classes with the same name? I suspect it may be related to that!
 
Gary Ba
Ranch Hand
Posts: 161
Firefox Browser Java Windows
  • Mark post as helpful
  • send pies
  • Report post to moderator
Try putting everything inside


inside public class Stock1.

I think what happens here is the compiler is looking for Stock1(......) from public class Stock1 which is it does NOT have.

Hope this helps,
Gary
 
Rob Spoor
Sheriff
Posts: 21135
87
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Report post to moderator
Duplicate of http://www.coderanch.com/t/514601/java/java/Why-doesnt-work-constructor-undefined
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!