Results 1 to 2 of 2
- 10-04-2013, 05:52 AM #1
Member
- Join Date
- Oct 2013
- Posts
- 1
- Rep Power
- 0
Ap Comp Science HW Question Methods
I can't figure this answer out. We just learned methods today and I am a little confused. The question is, Write a method called sum100 that adds up all the integers from 1 to 100 inclusive and returns the answer. If somebody wouldn't mind explaining how to do this that would be great! Thanks
- 10-04-2013, 06:50 AM #2
Re: Ap Comp Science HW Question Methods
Post your attempt and ask a specific question. Try writing the method signature. For example the main method is:
Java Code:public static void main(String[] args)
what access it should have?
what return type it should have?
what name it should have?
what parameters it should have?
should it be static or non-static?
If you do not know then review your class notes, textbook or Google it.
Similar Threads
-
methods question
By noobie_nate in forum New To JavaReplies: 2Last Post: 08-11-2013, 11:22 PM -
client on one comp and server on another comp
By NadE88 in forum NetworkingReplies: 2Last Post: 04-04-2013, 03:14 AM -
AP computer science question
By svo in forum New To JavaReplies: 9Last Post: 04-08-2012, 07:29 PM -
JAVA software solutions:For AP Comp. Science (Lewis,Loftus,Cocking)
By padutch in forum New To JavaReplies: 4Last Post: 11-28-2007, 12:59 AM
Bookmarks