This week's book giveaway is in the Java 9 forum.
We're giving away four copies of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications and have Sander Mak & Paul Bakker on-line!
See this thread for details.
Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Clear My Doubt  RSS feed

 
Desai Bhagya Lakshmi
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,clear my Doubt.I am waiting for reply


In the list i have number of objects.I have to sort those Objects according to the date.How we can do?

Thanks in advance
 
Prabhat Gupta
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I think you have posted your query at wrong forum.

Anyway to sort your object you should implement the Comparator interface and override the compare() method according to your requirement.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!