Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2013
    Posts
    8
    Rep Power
    0

    Default I m new in java pls help me complete this code

    public class Time {

    int hour, minute;
    double second;
    public Time() {
    this.hour = 0;
    this.minute = 0;
    this.second = 0.0;
    }
    public Time(int hour, int minute, double second) {
    this.hour = hour;
    this.minute = minute;
    this.second = second;
    }





    public static void printTime(Time t) {

    System.out.println(t.hour + ":" + t.minute + ":" + t.second);
    }
    }

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,572
    Rep Power
    25

    Default Re: I m new in java pls help me complete this code

    Please explain what problems you are having with the code. If there are error messages, copy the full text and paste it here.

    Please edit your post and wrap your code with code tags:
    [code=java]
    YOUR CODE HERE
    [/code]
    to get highlighting and preserve formatting.
    If you don't understand my response, don't ignore it, ask a question.

  3. #3
    Join Date
    Oct 2013
    Posts
    8
    Rep Power
    0

    Default Re: I m new in java pls help me complete this code

    I dont know how to create a main method

  4. #4
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,572
    Rep Power
    25

    Default Re: I m new in java pls help me complete this code

    If you don't understand my response, don't ignore it, ask a question.

  5. #5
    Join Date
    Oct 2013
    Posts
    8
    Rep Power
    0

Similar Threads

  1. Replies: 2
    Last Post: 03-21-2013, 05:37 AM
  2. source code editor with auto-complete feature
    By farzad89 in forum Eclipse
    Replies: 0
    Last Post: 06-15-2012, 02:38 PM
  3. I need urgent help to complete this code please!
    By kenson02 in forum New To Java
    Replies: 3
    Last Post: 12-14-2011, 02:37 AM
  4. complete the code
    By blackz in forum New To Java
    Replies: 2
    Last Post: 09-11-2011, 02:04 AM
  5. Complete code won't run in eclipse
    By confusedStudent in forum New To Java
    Replies: 2
    Last Post: 12-19-2008, 08:43 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •