Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Working with dates

Status
Not open for further replies.

bob3940

Programmer
Dec 21, 2004
13
0
0
US
I am new to Java but have extensive programming experience.

I am creating a class that will contain information on an event. I want to be able to store a simple date. I will NOT be performing any calculations or processing the date in any way other than verifying that a valid date is entered.

My event class will look something like this:
Java:
public class Event {
    private String eventId;
    private String eventName;
    private ?      eventDate;

** Constructor code **

** Set & Get Code **

What is the best way to store a simple date. Should I just store it as a String or should I go through the process of using java.util.calendar or something similar?

Thank you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top