Question: Write ( define ) a public static method named countUpFrom, that takes two int arguments and returns no value. You can safely assume that both

Write (define) a public static method named countUpFrom, that takes two int arguments and returns no value. You can safely assume that both arguments will always be positive integers, and the second argument value will be greater than the first argument value. When this method is called, it should print a count from the first argument value up to the second argument value.
Examples:
countUpFrom(1,5) will print 1,2,3,4,5,
countUpFrom(3,6) will print 3,4,5,6,
countUpFrom(1,2) will print 1,2,
You may wish to write some additional code to test your method.
Helpful Hints:
Use a counter controlled While loop to count from the first argument value to the second argument value. Print out the current count at each iteration of the loop.
Java's for loop is also a good choice for this problem.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!