3

My question is what does this:
<RecentActivity, RecentActivityController>

mean in this code:
public class RecentActivity extends AbstractActionActivity<RecentActivity, RecentActivityController>

Actually I want know the concept of the < and > operators. Clould someone give references to learn about them?

Arm
  • 141
  • 1
  • 8
  • 1
    Possible duplicate of [Java Generics](http://stackoverflow.com/questions/490091/java-generics) – juunas Jan 21 '17 at 18:10

1 Answers1

4

This is known as generics and here AbstractActionActivity is a generic class which accepts two parameters. For example, from the oracle tutorials:

public class Box<T> {
    // T stands for "Type"
    private T t;

    public void set(T t) { this.t = t; }
    public T get() { return t; }
}

As you can see, all occurrences of Object are replaced by T. A type variable can be any non-primitive type you specify: any class type, any interface type, any array type, or even another type variable.

You can learn further here

codingsplash
  • 4,785
  • 12
  • 51
  • 90