/** * Decapitalizer.java * * @author Jeff Ondich * @version 4/25/05 * * The main method for a program used in the Makefile lab. */ import java.util.*; import java.io.*; public class Decapitalizer { public static void main( String[] args ) { if( DebugState.debugging ) System.err.println( "This is a debugging message of negligible content." ); if( args.length != 1 ) { System.err.println( "Usage: java Decapitalizer inputfile" ); return; } Scanner in; try { in = new Scanner( new File( args[0] ) ); } catch( FileNotFoundException e ) { System.err.println( e.getMessage() ); return; } while( in.hasNextLine() ) { System.out.println( in.nextLine().toLowerCase() ); } if( DebugState.debugging ) System.err.println( "This debugging message reminds you that Edsger Dijkstra was born on May 30, 1930." ); } }