这是什么线和QUOT的意义; ArrayAdapter<串GT;适配器= QUOT; [英] What is the meaning of this line "ArrayAdapter<String> adapter = "

查看:134
本文介绍了这是什么线和QUOT的意义; ArrayAdapter<串GT;适配器= QUOT;的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道,什么是以下行的意义。什么是<串GT; 部分是指

  ArrayAdapter<串GT;适配器=

下面是code的全系列。

  ArrayAdapter<串GT;适配器=新ArrayAdapter<串GT;(ExternalData.this,android.R.layout.simple_spinner_item,路径);


解决方案

<串>将所有部分意味着 ArrayAdapter 的String [] 数据(路径参数)合作。换句话说,阵列中的每个元素将是字符串

I'm wondering, what is the meaning of the following line. What is the <String> part mean?

ArrayAdapter<String> adapter = 

Here's the full line of code.

ArrayAdapter<String> adapter = new ArrayAdapter<String>(ExternalData.this, android.R.layout.simple_spinner_item, paths);

解决方案

The <String> part of it all means that the ArrayAdapter will be working with String[] data (the paths parameter). In other words, each element in the array will be a String.

这篇关于这是什么线和QUOT的意义; ArrayAdapter&LT;串GT;适配器= QUOT;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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