Countdown2 - hours System.out.println"Number of...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
import java.util.*; import java.awt.*; import java.applet.*; import*; import java.text.*; import javax.swing.*; i public class Countdown2{ p public static void main(String []args){ boolean reached = false; int hours = 47; int minutes = 47*60; long t1 = System.currentTimeMillis(); while(true){ try{ System.out.println("Number of hours left to finish finals(aka PARTYYY): "
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: +hours); System.out.println("Number of minutes left to party: " +minutes); System.out.println("Number of minutes left to party: " +t1); Thread.sleep(1000*60); //hours--; minutes--; long t2=System.currentTimeMillis(); System.out.println(+t2); if(hours==0) reached=true; } catch(Exception e){ } } } }...
View Full Document

This note was uploaded on 02/14/2011 for the course CS 180 taught by Professor Staff during the Fall '08 term at Purdue.

Ask a homework question - tutors are online