// Trying out methods // Author: Kiri Wagstaff // Date: July 2, 2001 public class Methods { // myPrint: print a string enclosed by angle brackets // Input: a string // Output: none (void) public static void myPrint(String s) { System.out.println("<" + s + ">"); } public static void main(String args[]) { String name = "Kiri"; System.out.println("The string is "); // Call the myPrint method with name as the input // This is a method "invocation". // This method does something, but doesn't return anything. myPrint(name); // Call myPrint with a quoted string myPrint("Testing myPrint."); myPrint("I can also print math: 6 * 5 = " + (6 * 5)); } }