#I am looking for this concept

1 messages · Page 1 of 1 (latest)

hazy oar
#

Class test<O extends Enum<O> &IMatch>

I want to understand how this works O extends Enum<O> &IMatch

Any topics that I can look for to get a deeper understanding?

pure dewBOT
#

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

pure dewBOT
#

While you are waiting for getting help, here are some tips to improve your experience:

Code is much easier to read if posted with syntax highlighting and proper formatting.

If nobody is calling back, that usually means that your question was not well asked and hence nobody feels confident enough answering. Try to use your time to elaborate, provide details, context, more code, examples and maybe some screenshots. With enough info, someone knows the answer for sure.

Don't forget to close your thread using the command </help-thread close:1027500463647621170> when your question has been answered, thanks.

fringe birch
#

essentially, u can give multiple restrictions to a generic

#

such as T extends A & B & C

#

T extends CanJump, CanWalk, CanEat

#

and then anything that fulfills all those requirements can be given

hazy oar
#

Can you tell me more about how this part Enum<O> &IMatch will work.
&IMatch means what?
Thanks for the help

#

IMatch is an interface

#

If I am correct Enum<O> is a class that has some generic O.

lament solstice
#

the type both extends Enum and implements IMatch

#

Enum<E extends Enum<E>> is the base class for every single enum. When you write your own enum class Foo, its actual signature is Foo extends Enum<Foo>

#

If that Foo also implements the IMatch interface, it will be a suitable candidate for that generic

hazy oar
#

Understood thanks for the help

hasty wave
#

hey can any one tell me from where i should i get materials for java

#

like theory portion etc

smoky raft
#

But to answer your question

pure dewBOT
#

MOOC is a completely free introductory Java course created by the University of Helsinki, it is a great way to learn Java from the ground up.

It consists of two parts, one at beginner, and another at intermediate level. The end of the course is marked by creating your own Asteroids game clone!

Even though the instructions show how to configure and use NetBeans for the course, you can use IntelliJ. To use IntelliJ, simply install the TMC plugin by opening IntelliJ -> File -> Settings -> Plugins and searching for TMC. You will then be able to use IntelliJ to complete MOOC.

Visit MOOC here: https://java-programming.mooc.fi/
(the course is available in both English and Finnish)

About the course - Java Programming