Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6124019
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T16:05:05+00:00 2026-05-23T16:05:05+00:00

I am a college student. In our college we have to develop a simple

  • 0

I am a college student.

In our college we have to develop a simple Date class in Java similar to the one available in java.util package.

If we do that then what are the methods we can implement in that class,
Since most of the methods are deprecated in original Date class.

I saw the original Date class definitions in java/util/Date.java. Being a beginner to java, I could not understand the concepts of Serializable, Cloneable, Comparable ,and many variables like fasttime.

It will be good if we can implement this date class simply (since we have to develop this code as a test with in 3 hours at lab.)

Whether it is necessary to implement those concepts in a simple Date class.

If I take it as a Project and start developing the whole Date utilities,
then that code will run to many pages
and I cannot finish it with 3 hours for our lab session.

So someone please guide me….

I have doubts about….

  1. Whether it is possible to create a utility class similar to Date class with a simpler implementation.
  2. If we do that, then what are the methods we can implement in that class , since most of the useful methods are deprecated in the original date class.

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T16:05:06+00:00Added an answer on May 23, 2026 at 4:05 pm

    You don’t have to implement all the interfaces to have a simple working Date class.

    I would suggest that you forget about Java’s Date class and consider what you think is needed for a date class. For example:

    • Get/set day of month
    • Get/set month
    • Get/set year
    • Get day of week
    • toString()

    Would give you a pretty good basic date class.
    For the sake of completeness, I’ll tell you what the interfaces are for. You can decide whether to implement them based on how much you have learned and the assignment’s requirements:

    • Serializable is for saving your object to a stream. You actually don’t need to do much work to implement it.
    • Comparable is for comparing objects (date1.compareTo(date2) should return an integer indicating whether date1 is before, after, or the same as date2).
    • Clonable is for creating a deep copy of the object.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am a college student at a school that teaches mainly in Java. One
I work at a college and our student management systems academic year start date
I have recently created a student organization website (i.e. www-sc.xxx.edu/studentorganizations/ourorganization). Our college does not
I am college student (computer science) and have just started a C# programming class.
I'm a college student doing a Java homework. I've created this program that allows
I'm a blind college student who is taking an introduction to programming class that
I am a college student that makes his programs here and there in C#,
Suppose I have a relationship 1 to N, for example Student , College. Student
I am a college student slightly new to web programming and lately I have
I am a college student taking a intro to programming C#. That being said,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.