Doubt abstract classes


I've been looking through some websites how abstract classes work, and I think I understood it well, but I've seen an example where I do not understand a part, and I do not know how to look for it to access a tutorial explaining it. I hope someone can help me or pass me a link.

This is when when creating an abstract class,

asked by Francisco Pagan 04.12.2016 в 13:02

3 answers


Good, this is because that abstract class is parameterized by a certain type of objects .

I'll give you a page where you'll find information about this.


answered by 04.12.2016 / 13:20

That has nothing to do with the abstract classes, it has to do with the generic ones. See the Java documentation about it and you'll understand. The keys are used so that part of the code is not strictly typed but can respond generically to different types and can reuse the code more. Generics are declared between angles <>

answered by 04.12.2016 в 13:17

What is between <> is the type of object in which your class or method is parameterized. It is not exclusive of a class or abstract method.

Within the containers <> the type of object is defined:


Or a generic type that can be:

  • E - Element (used a lot by the Java Collections Framework)

    • K - Key
    • N - Number
    • T - Type
    • V - Value S, U, V etc. - used to represent other types.
answered by 04.12.2016 в 13:46