I was playing around with java interfaces a little and tried to implement a stack.
However, as soon as I added the constructor I got a compiler error:
./DefaultStack.java:5: error: <identifier> expected
DefaultStack<T> () {
^
Here's my code:
public class DefaultStack<T> implements Stack<T> {
DefaultStack<T> () {
}
}
This is probably a really obvious mistake, but I'm kinda new to Java.