A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Java in General
extract particular elements from arraylist
Raj Kumar Bindal
Joined: Apr 15, 2006
May 04, 2006 04:59:00
I want to extract particular elements from an arraylist.
If arraylist contains elements : Rajkumar , Shashii , Hari Kumar , paters , nam kumar
I want to take elements ending with kumar i.e. Rajkumar, Hari Kumar , nam kumar
How can i do it through efficient coding
Thanx in advance
Joined: Sep 28, 2004
May 04, 2006 05:16:00
Well, lists are not sorted -- so I don't think there is anything more efficient than to just use an iterator, and checking each
member with its endsWith() method.
Java Threads, 3rd Edition
Jini in a Nutshell
Java Gems (contributor)
subject: extract particular elements from arraylist
Problem with date insertion in MySQL
Copying objects from one Arraylist to another Arraylist
Intersection of two lists
To extract column elements from a particular position onwards "MYSQL"
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014