Java program which explores the basic use of functions with parameters of variable lengths