public abstract class AsyncTask<Params, Progress, Result> { }
Java-related question what kind of declaration is this <> at the end of the class name. something I have never studied in OOPS chapter in Java
public abstract class AsyncTask<Params, Progress, Result> { }
Java-related question what kind of declaration is this <> at the end of the class name. something I have never studied in OOPS chapter in Java
That kind of declaration is used to determine what type of objects the java class will use.
In this case, since AsyncTask receives three parameters on execution/call, it determines the type of data the task instance will use:
public abstract class AsyncTask<Integer, String, String> { }
f.e -> new CreatedTask().execute(param1, param2, param3);
This is used in other structures too, such as ArrayLists, which use the "<>" to determine what type of objects the structure will store.