Search:

Type: Posts; User: kumalh

Search: Search took 0.07 seconds.

  1. Replies
    1
    Views
    1,403

    Declaring enum problem

    Hi all, I'm trying to declare a enum type:



    public enum Month {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12};


    However whenever I try to compile, I get the following error:

    <identifier>...
  2. Replies
    12
    Views
    1,776

    Re: Time an object is created

    Sorry about that. If my commenting makes no sense, I apologise. It's been a very, very long night.




    // Method rolls the date of the calendar forward by a given number of days
    public...
  3. Replies
    12
    Views
    1,776

    Re: Time an object is created

    So I've written this:



    public void rollDaysTEST(int d) {
    int count = d;
    for(int i = 0; i == d; i = i + 1){
    date = date + 1;
    if(date >...
  4. Replies
    12
    Views
    1,776

    Re: Time an object is created

    Ahh sorry about the cross posting. This is my first time using forums so I'm not too familiar with all of that stuff. Like you said, I only meant well. In future I'll be sure to be more careful....
  5. Replies
    12
    Views
    1,776

    Re: Time an object is created

    Ok, so I've sorted out all of that stuff. Thank you for your help.

    I have another problem that I can't get though. I'm not sure if I should start a new post or not (I'm new - I apologise), so I'll...
  6. Replies
    12
    Views
    1,776

    Re: Time an object is created

    Ok, I'll check out Calendar and Date. Thanks.

    Also, I'm writing my own Calendar class (I know one already exists, but I'm required to write my own. So I can't use any methods from the pre-existing...
  7. Replies
    12
    Views
    1,776

    Re: Time an object is created

    How do I do this? And do I save it as a String?



    By name I mean the name of the instance. So say you created a new Calendar object and named it 'Cal' (e.g. cal = new Calendar(4, 8, 2011) )
    So...
  8. Replies
    12
    Views
    1,776

    Re: Time an object is created

    Also, how do I return the object name?
  9. Replies
    12
    Views
    1,776

    Time an object is created

    Hi, I'm creating a class and want to write a method that prints the time an object was created. Is there any way to do this?

    Thanks in advance!!

    Kumalh.
  10. Re: Creating and implementing class for creating a calendar object

    Hey Norm, thanks for the reply.

    I don't think I understand what you mean, and you don't understand what I mean. I have to write my own calendar class to do the things I wrote in the OP. Not...
  11. Creating and implementing class for creating a calendar object

    Hi, so I have to create and implement a class for creating calendar objects. Some of the behaviours that the class has to do is:

    - Print a display for a given month and year
    - Print a display for...
Results 1 to 11 of 12