I'm learning java and Abstract Data Types and I'm getting a little bit confused.
Basically, from what I understood, Abstract Data Types are something that is defined, but not implemented. So we have the API of the Abstract Data Type and we need to implement those methods specified in the API. For example, we have a Stack and we can implement it by using arrays, nodes, etc... As an example, to declare those objects we do:
Stack ex = new ArrayStack<>(); or Stack ex = new NodeStack<>();
My problem is, we can also do Stack ex = new Stack<>(); without implementing anything. In this case which implementation are we using? What's the point of implementing it then? Can we choose which implementation we are going to use without implementing it ourselves? I'm so lost.
Another example, why do we need to create nodes to implement ADTs if we can use a LinkedList directly? Is it for leaning purposes only or are they something different?
Thanks for the help!