Vass Lee wrote:Thanks for your reply.Now i want to apply some filters in column level .how can i apply filter in person class? any filter method is there in java.util. package? can you provide any sample here ?
Just a small point: you're in Java now and you have a class, so it's best not to think in terms of "columns" any more. Databases have columns, Java has fields (or attributes). Assuming that, per Nomaan's example, you have a java.util.List of
Persons, a filtering method might look something like this:
however, filters and sorts being what they are, there are endless possibilities (and you might even want to combine the two), so as the others say
you should probably look at java.lang.Comparable and java.util.Comparator as well.
Also, Java has a dizzying array of collection types, some of which are very powerful, so I suggest you have a look at the
tutorials and get familiar with them.
HIH
Winston