Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: Please help

  1. #1
    Junior Member
    Join Date
    Dec 2012
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Please help

    can any1 please tell me why the following code wont output the months?
    the average will output but error messages wont allow the highest and lowest month to be output:

    System.out.println("\t\t)---------Table of Results---------(");
    System.out.println("\tAverage Sunshine | Highest Rainfall | Lowest Rainfall");
    System.out.printf("Month | \t%.2f\n",averageSunshine(sunshine));
    System.out.print(month[highestMonth(sunshine)],month[lowestMonth(sunshine)]);

    plesase help :S

  2. #2
    Super Moderator curmudgeon's Avatar
    Join Date
    Aug 2012
    Posts
    1,130
    My Mood
    Cynical
    Thanks
    64
    Thanked 140 Times in 135 Posts

    Default Re: Please help

    If you're getting error messages and need help with them, it is helpful for you to post those messages for us to see.

  3. #3
    Junior Member
    Join Date
    Dec 2012
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Please help

    its ok now, got it sorted . shouldn't of had commas in the last input statement.
    thanks anyway though