T []对象是什么? [英] what's T[] object?

查看:182
本文介绍了T []对象是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

ArrayAdapter的构造函数如下:

the constructor of ArrayAdapter is as follows:

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

im是Java&的新功能android,我之前没有看到数据类型T[],有人可以解释一下它是什么还是给我一些有关它的网页?

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是一个具体的类类型(不太可能),或者是一个通用类.查看您的班级标题,看看是否是这种情况.

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> {}

有关泛型及其工作原理的教程,请参见 http://docs.oracle.com/javase/tutorial/java/generics/index.html

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

这篇关于T []对象是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆