A community for students.

    Here's the question you clicked on:

    55 members online
    • 0 replying
    • 0 viewing


    • 2 years ago

    hey guys, i need help with this code because i don't know the parameter and can't figure it out: public class Date { private int month; private int day; public Date (int month, int day) { //Constructs a new Date representing the given month and day. setDate(month, day); } public boolean equals(Date d) { //This method should return true when the Date object on which //it was called represents the same date as the given Date parameter, //or false otherwise. if ( ) { return true; } else { return false; } } }

    • This Question is Open
    1. eSpeX
      • 2 years ago
      Best Response
      You've already chosen the best response.
      Medals 0

      You are creating "Dates" and setting the month and day inside each. So if you run the equals() command, it should read and compare its values to that of 'd' and return true if they are the same date.

    2. Not the answer you are looking for?
      Search for more explanations.

      • Attachments:

    Ask your own question

    Sign Up
    Find more explanations on OpenStudy
    Privacy Policy

    Your question is ready. Sign up for free to start getting answers.

    spraguer (Moderator)
    5 → View Detailed Profile

    is replying to Can someone tell me what button the professor is hitting...


    • Teamwork 19 Teammate
    • Problem Solving 19 Hero
    • You have blocked this person.
    • ✔ You're a fan Checking fan status...

    Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

    This is the testimonial you wrote.
    You haven't written a testimonial for Owlfred.