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: Find the sum or total of count

  1. #1
    Junior Member
    Join Date
    Feb 2013
    Posts
    16
    My Mood
    Confused
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Default Find the sum or total of count

    Hello,

    Is there any way in which I can find the sum or the total of two count variables?

    E.g. I want to be able to use the COUNT, and add them together to give me a total, but I am not sure how to do that. I tired using the addition method, but it doesn't work.

    Thank you for your time.


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: Find the sum or total of count

    add them together to give me a total
    total = count1 + count2;  //  add them together
    This seems a very simple problem. Can you explain what problem you are having doing this?

    it doesn't work.
    Please explain what " it doesn't work" means?
    If you don't understand my answer, don't ignore it, ask a question.

  3. The Following User Says Thank You to Norm For This Useful Post:

    GameGirl91 (March 4th, 2013)

  4. #3
    Junior Member
    Join Date
    Feb 2013
    Posts
    16
    My Mood
    Confused
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Default Re: Find the sum or total of count

    I been using three different methods for each of the "counts" It works now, as I put everything in one method.
    Thank you

Similar Threads

  1. stuck trying to count sum of even and odd numbers for reading loop.
    By gio in forum Loops & Control Statements
    Replies: 2
    Last Post: February 21st, 2013, 11:23 AM
  2. Recurring(Looping) Sum, Count and Average
    By apagnihotri in forum What's Wrong With My Code?
    Replies: 1
    Last Post: December 13th, 2012, 08:37 AM
  3. Program to calculate pay and total sum with daily increment. Urgent!
    By ePerKar3 in forum What's Wrong With My Code?
    Replies: 11
    Last Post: December 5th, 2011, 01:20 PM
  4. find the sum of even number not exceed four million
    By i4ba1 in forum Algorithms & Recursion
    Replies: 10
    Last Post: June 29th, 2011, 08:08 AM
  5. Find total number less than average
    By maximus20895 in forum Collections and Generics
    Replies: 2
    Last Post: December 1st, 2010, 01:46 PM