Search code examples
javaandroidclassextend

Java extends from class with <class name>


Can you explain what is the meaning of in the below code snippet

public class NoteAdapter extends  ArrayAdapter<Note>{

}

In my example Note is java class.


Solution

  • It means Note adapter inherits from ArrayAdapter which is a generic class.The generic class ArrayAdapter accepts an argument of type Note.To understand more visit the topic Generics in java