The use of the key word instanceof is an extremely bad practice and should almost never be used in common application code (an exception is the method Object#equals()). It is a bad practice because it breaks object orientation and promotes the use of tedious if .. else or switch constructs. My son has solved the task by using instanceof. Now I wonder whether this was the intended solution. As I can not repeat the task in order to check this, I am asking you.
Is it intended to use instanceof in getOutputByBookType()?
In der Diskussion
Kommentare
- Beliebt
- Neu
- Alt
Du musst angemeldet sein, um einen Kommentar schreiben zu können
Auf dieser Seite gibt es noch keine Kommentare