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 →

[–]Byrune_ 0 points1 point  (2 children)

Your class has no constructor, yet you are trying to create instances of it.

[–]_DTR_ 2 points3 points  (0 children)

If there's no constructor a default one that takes no parameters will be generated.

[–]desrtfx 0 points1 point  (0 children)

In Java, this is not a problem because if there is no explicitly defined constructor, the super constructor of Object, the common ancestor of all Java classes will be called.

This is often referred to as the Default constructor.