// generated by Dynamator Wed Mar 31 19:16:32 CST 2004 import java.io.PrintWriter; import java.util.Calendar; public class TheTime { public static void main(String[] args) { PrintWriter writer = new PrintWriter(System.out, true); output(writer); writer.flush(); writer.close(); } public static void output(PrintWriter out) { Calendar calendar = Calendar.getInstance(); int hour = calendar.get(Calendar.HOUR_OF_DAY); out.write("\n"); out.write("\n"); out.write("
\n"); out.write("The time is "); out.write(String.valueOf(calendar.getTime())); out.write("
\n"); if ( hour < 12 ) { out.write("Good Morning!
"); } if ( 12 <= hour && hour < 18 ) { out.write("Good Afternoon!
"); } if ( 18 <= hour ) { out.write("Good Evening!
"); } out.write("\n"); out.write("\n"); } }