• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

display rows in order

 
Sri Dharan
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends,
In an employee object have properties like first name, last name, email ,location.I want to display the rows in ascending/descending order of first name.Please help in this solution.

regards
Sri
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65216
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do you sort just one object? Or do you have a list of them? Please be complete in your questions.

Please read this for more information.
 
Sri Dharan
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
Recently I went for an interview ,in that he asked this question .I did not find any solution.That question is: In one employee object have different propertie like firstName,lastName,email ,location,..He wants do display all the properties in order of firstName property.
Is it possible to do that?If yes please explain...

regards
Sri
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34965
378
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sri,
I think he was looking to see if you know about the Comparator interface. Sometimes interview questions are incomplete, but you can always ask the interviewer clarifying questions.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic