如何获取arraylist的索引? [英] How to get index of arraylist?

查看:987
本文介绍了如何获取arraylist的索引?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我必须在存储项(例如名称,id等)中使用arraylist.现在,我想获取名称或id的特定索引,然后如何获取arraylist的索引?

Hello,

I have to take arraylist in that store items like name,id,etc.Now i want to fetch particular index of name or id then how to acess index of arraylist?

推荐答案

Try This

arraylist a = new arraylist;
a.IndexOf("your value")


这篇关于如何获取arraylist的索引?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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