Java Help, Please...

Status
You're currently viewing only Malyk's posts. Click here to go back to viewing the entire thread.
Not open for further replies.

Malyk

Ars Tribunus Angusticlavius
8,558
Subscriptor
This really reaks of a "do my homework for me" post, but I'll give you a few pointers.

First, the main method takes one parameter; that being an array of strings that were entered on the command line. So you'll want to access the items in that array to find the numbers you'll be adding.

Second, every array has a .length() method, so that will tell you the length of the array.

Third, look into the Integer class. One of it's constructors takes a string and makes it into an integer.

Fourth, you'll want to use a for loop to move through the array backwards printing out the numbers and adding them to another variable for the total.

To recap, look at the main methods parameters, the .length method of arrays, the Integer class constructors, and finally for loops.

Should be pretty easy once you understand how to use all of those things.

Mike
 
Status
You're currently viewing only Malyk's posts. Click here to go back to viewing the entire thread.
Not open for further replies.