I need a container to keep track of a bunch of objects (public class Note
), and a Stack
seems to be perfect for what I need. The container's called listOfNotes
. But when I try to push a Note onto the stack with:
listofNotes.push(Note0),
the compiler gives me this error:
warning: [unchecked] unchecked call to push(E) as a member of the raw type Stack.
Does this mean stacks can't hold objects, or am I using the command "push" wrong?