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 2 of 2

Thread: help with class calling

  1. #1
    Junior Member
    Join Date
    May 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default help with class calling

    Karl Gauss had an algorithm that was more efficient than a for loop for summing the numbers 1 through N. To sum the numbers he used N ( N + 1 ) / 2

    Write a program with two java Methods: one to calculate the sum with a for loop and the other using Gauss’s formula. Make calls to the two methods from the main Method.


  2. #2
    Junior Member
    Join Date
    Nov 2012
    Location
    Kolkata, India
    Posts
    8
    My Mood
    Cool
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default Re: help with class calling

    --Code removed for the second time.
    --Do not post it again
    Last edited by jps; May 17th, 2013 at 11:43 PM. Reason: spoonfeeding

Similar Threads

  1. calling class in other class not working
    By lf2killer in forum What's Wrong With My Code?
    Replies: 5
    Last Post: December 4th, 2012, 03:37 PM
  2. Java, calling another public class from within the main class giving problems.
    By RandomGaisha in forum What's Wrong With My Code?
    Replies: 9
    Last Post: November 26th, 2012, 02:30 PM
  3. calling a method in class
    By MrBean in forum What's Wrong With My Code?
    Replies: 2
    Last Post: October 31st, 2012, 12:31 AM
  4. Calling / Updating class?
    By JuLiAnc in forum What's Wrong With My Code?
    Replies: 3
    Last Post: January 14th, 2012, 07:56 AM
  5. about calling sub class
    By pokuri in forum Object Oriented Programming
    Replies: 3
    Last Post: January 11th, 2011, 03:30 PM