// Project: StaticMethods // No modules defined // Source code file: Square.java // Test the square method that returns // the square of its input value. // The square method is static because it is called // from a class (not called from an object). public class Square { public static int square(int theValue) { int retVal = theValue * theValue; return retVal; } // Test the square method public static void main(String[] args) { System.out.println(square(5)); } }