ArrayAdapter的构造函数如下所示:
ArrayAdapter(Context context, int textViewResourceId, T[] objects)
即时通讯新的Java和Android,我没有看到数据类型T[]之前,任何人都可以解释它是什么,或给我一些关于它的网页?
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?
最满意答案
T是具体的类类型(不太可能),或者它是类通用的。 看看你的班级标题,看看是否是这种情况。
IE
Class SomeClassType<T> {}有关泛型的教程及其工作原理可以在这里找到http://docs.oracle.com/javase/tutorial/java/generics/index.html
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
更多推荐
发布评论