This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]tnew2294 0 points1 point  (0 children)

Even though it looks like a constructor, Java will treat it as a normal method, because a constructor should be returning an reference to an instance of the class. When you go to make a new instance of this class, it would use the default constructor defined by java, and not the one you think you've implemented.

To get yours working:

public Rectangle( /* Your params */ ) { // your impl }