Practice: Subroutines

Take out a piece of paper. We’ll be programming on paper.

Write Java code for the following problems.

Problem 1

Write a public static subroutine sayHi that prints out ‘Hello World’.

Problem 2

Write a public static subroutine countDown that counts down from 100 to 0 by fives and prints the numbers as it goes.

Problem 3

Write a private static subroutine evenNumbers that prints out the even numbers from 22 to 44.

Show me your code before you leave