#Stack class questions
12 messages · Page 1 of 1 (latest)
⌛ This post has been reserved for your question.
Hey @flat patio! Please use
/closeor theClose Postbutton above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
that creates a raw type and basically makes the generics useless
What is a raw type?
when using generics where the generic can be inferred from context, like in your example, <> lets java infer the generic
sec
https://dev.java/learn/generics/intro/#raw-types check that out
Generics enable types (classes and interfaces) to be parameters when defining classes, interfaces and methods. Much like the more familiar formal parameters used in method declarations, type parameters provide a way for you to re-use the same code with different inputs.
The warning shows that raw types bypass generic type checks, deferring the catch of unsafe code to runtime. Therefore, you should avoid using raw types.
If you are finished with your post, please close it.
If you are not, please ignore this message.
Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.