Java Count Up and Down

package com.thealmostengineer.countupdown;

* @author almostengr
* @file Counts up and down to the specified provided number. 

public class CountUpDown {
 private static int n; // number
 private static int maxNumber = 99; // number to count up to, count down from 

 public static void main(String[] args) {
 } // end public static void main(String[] args)

 private static void countUp(){
  // count up 
  System.out.println("Counting up...");

  for(n = 1; n <= maxNumber; n++){

  System.out.println("Done counting up.");
 } // end private static void countUp()

 private static void countDown(){

  // count down
  System.out.println("Counting down...");

  for(n = maxNumber; n >= 1; n--){

  System.out.println("Done counting down.");
 } // end private static void countDown()

} // end public class CountUpDown
I enjoy sharing the content that you find here. I ask that you consider purchasing an item on my Amazon Wish List or you can make a donation.

Back To Top