#Generics

1 messages · Page 1 of 1 (latest)

winged spindle
#

Can someone tell me why I cant create new Nodes

abstract elmBOT
#

@winged spindle

Kadixx Uploaded Some Code
Uploaded these files to a Gist
supple hamlet
#

can you give some more context about where it is going wrong like where you are trying to create new nodes and where it is failing ?

winged spindle
#

Exception in thread "main" java.lang.Error: Unresolved compilation problems:
The constructor Node<cole>() is undefined
The constructor Node<cole>() is undefined
The constructor Node<cole>() is undefined

    at List.InsertAfter(List.java:230)
#

@supple hamlet

supple hamlet
#

oh is it cause there is no argument when you call it cause when u defined the constructor it takes some data

#

maybe try head = new Node<>(data); ?

winged spindle
#

Yea that’s all i needed. Thank you so much.