Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what's T[] object?

the constructor of ArrayAdapter is as follows:

ArrayAdapter(Context context, int textViewResourceId, T[] objects)

im new to java & android, i didn't see the data type T[] before, can anyone explain what it is or give me some web page about it?

like image 681
Searene Avatar asked Feb 22 '23 12:02

Searene


1 Answers

The T is either a concrete class type (unlikely), or it is a class generic. Look at your class heading to see if this is the case.

IE

Class SomeClassType<T> {}

Tutorials on generics and how they work can be found here http://docs.oracle.com/javase/tutorial/java/generics/index.html

like image 113
AlanFoster Avatar answered Mar 04 '23 11:03

AlanFoster