CIS 3931 - Elementary Java Programming
Code Examples - Methods
TestMax.java
- a method that computes the maximum of two integers
TestPassByValue.java
- a method that illustrates how Pass By Value works
TestMethodOverloading.java
- illustration of method overloading, with
max
methods
ComputeMeanDeviation.java
- sample program that uses some
Math
class methods
PrintCalendar.java
- a case study that uses a number of methods, in a program that prints out a monthly calendar
ComputeFactorial.java
- a recursive method to compute the factorial of a number
ComputeFibonacci.java
- a recursive method to compute numbers in the Fibonacci sequence
TowersOfHanoi.java
- a recursive solution to the Towers of Hanoi problem