#How do i create a new queue?

1 messages · Page 1 of 1 (latest)

minor geodeBOT
#

<@&987246399047479336> please have a look, thanks.

polar fjord
#

using the new keyword

#

and you need to specify a type for the generic T

neon gyro
#

um

#

wdym

neon gyro
tame stone
#

SomeObject myObject = new SomeObject("someText");

neon gyro
polar fjord
#

check your constructor of Queue

#

it doesnt take any arguments

#

also you are missing the generics

neon gyro
neon gyro
polar fjord
#

Queue<Type> queue = new Queue<>();

#

and replace Type with the one you actually want to store

polar fjord
#

you currently give it an argument

#

but why?

neon gyro
#

idk more than that

polar fjord
neon gyro
#

like that?

neon gyro
#

oh wait a min

#

YES

#

i did it

#

aight we on now