Results 1 to 2 of 2
- 09-11-2011, 09:09 PM #1Member
- Join Date
- Sep 2011
- Rep Power
pls help me with this , its urgent ! thanks.
1. Write a method that will return the sum of all digits in an integer. The method signature is as follows:
(for example, sum(1234) returns 10 and sum(12345) returns 15.)
public static int sum(int number)
2. Write a method that returns the number of days in a year using the following header:
public static int numberOfDaysInAYear(int year)
Write a test program that displays the number of days in year 2000, ..., and 2010.
Re: pls help me with this , its urgent ! thanks.
You have recently posted the following question in the forum:
- Give us an informative thread title, one that summarizes your specific problem.
- Avoid using "urgent" and similar words as experience has shown that this will do nothing but turn many folks off from helping you.
- Show what you've done
- Ask as specific questions as possible such as how to fix such-and-such bug.
- If you are completely stuck, contact your instructor for one-on-one help.
- Also look at this link as it's very helpful suggestions: So, You Need to Write a Program but Don't Know How to Start
- And this link to help you write better forum questions: How To Ask Questions The Smart Way
Best of luck.
Last edited by Fubarable; 09-11-2011 at 09:19 PM.
- By agentkiran007 in forum Advanced JavaReplies: 23Last Post: 08-08-2010, 03:59 PM
- By ramroum in forum Java AppletsReplies: 15Last Post: 06-27-2010, 03:08 AM
- By java_idiot in forum New To JavaReplies: 6Last Post: 05-02-2010, 10:04 AM
- By winnie99 in forum JavaServer Pages (JSP) and JSTLReplies: 3Last Post: 12-18-2009, 04:17 PM
- By nehaa in forum NetworkingReplies: 12Last Post: 01-23-2009, 06:46 PM