import java.io.*; public class PrintHalfMain { public static void main (String args [ ]) throws IOException { Numbers.printHalf (50); } // method main } // class PrintHalfMain class Numbers { /** * Prints one half of the value of the int in a specified String object. * * @param s - the String object that consists of an int. * * */ public static void printHalf (String s) { try { System.out.println ("Half of " + s + " is " + Integer.parseInt (s) / 2); } // try catch (NumberFormatException e) { System.out.println (e + " is not an int"); } // catch System.out.println ("\n...continuing with the rest of the program"); } // method printHalf } // class Numbers