• Post Reply Bookmark Topic Watch Topic
  • New Topic

Which Collection is used to achieve this task  RSS feed

 
krishnamurthy durgam
Greenhorn
Posts: 13
Hibernate Java Java ME
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
public class Customer{

String name;
Date date;
String address;
String pincode;
................


}
In Customer class having the variables, and we are saving the database suppose if we are displaying the customer data according the date wise( ' eg: it is an telecom application users can take the connections, according to that which date and time how many users are take the connection i want to display DATE wise').

eg:

date name address pincode
27/13 abc newyark 546246
26/13 jhon landon 0136536

like wise i want to display the content in jsp page?

please tell me how can do this task in collections?


 
Vishal Hegde
Ranch Hand
Posts: 1078
Java Windows
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think it shoud be List
 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As the post above mentions, use a List(Customers). When you fetch the customers from the database, fetch them sorted based on the date and put them into the List!

I would advice you to read this first http://www.coderanch.com/how-to/java/CarefullyChooseOneForum
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Joe.
The question is not exactly SCJP/OCPJP related. Moving to a more appropriate forum
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!