• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Sort array of string by Date...

 
Leeee Ming
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator



Here are my sample of codes for a small diary i am creating in java to store my meeting details... What i am stuck is how do i go about sorting my arrary list according to the date that i have inputed....
 
Leeee Ming
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In addition to my question asked, what i require is when i input a date in....it should display all meetings which fall on the specific date which i have inputted.....
 
Leeee Ming
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
After some analyzation of my program...I was thinking of how to use Java Iterator to process the entire list of meetings so as to search for meetings which falls on a specific date(which is my input)

How do i go about doing that..Stuck here..

Thanks
 
Chengwei Lee
Ranch Hand
Posts: 884
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,

I'm rather puzzled by your code. Firstly, your 2 methods won't work. The add method is merely adding a new meeting to a local list, i.e., they won't be around when you exit the method call. Your listing method is listing nothing. Again, your local variables don't contains any information.

Lastly, what is this Meeting object? Unless you have this class in the same directory as your diary, your code most likely will not compile.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic