help plz... runtime error

// try compile it, y got runtime error ?

import java.io.*;

class TimeFormatException extends Exception {};

class Time{

private int hour;

private int minit;

private BufferedReader in;

private TimeFormatException t;

private int ansHour;

private int ansMinit;

private String ans;

public Time(){

in = new BufferedReader(new InputStreamReader(System.in));

hour = 0;

minit = 0;

}

public void setHour(int h){

hour = h;

}

public int getHour(){

return hour;

}

public void setMinit(int m){

minit = m;

}

public int getMinit(){

return minit;

}

public void enterTime() throws IOException{

while(ans.equals("y")){

System.out.println("Enter Hour: ");

ansHour = Integer.parseInt(in.readLine());

System.out.println("Enter Minit: ");

ansMinit = Integer.parseInt(in.readLine());

System.out.println("Againt ? ");

ans = in.readLine();

};

}

public void convertTime() throws TimeFormatException{

setHour(ansHour);

setMinit(ansMinit);

if(hour < 12 && minit > 60 ){

t = new TimeFormatException();

throw t;

}

else{

hour-=12;

System.out.println("Time is " +hour+ ":" +minit);

}

}

}

public class ConvertTime{

public static void main(String[] args) throws IOException{

Time tt = new Time();

try{

tt.enterTime();

tt.convertTime();

}catch(TimeFormatException t){

System.out.println("There is no such time as " +tt.getHour()+ ":" +tt.getMinit());

}

}

}

[1708 byte] By [F.Tottia] at [2007-10-3 4:13:12]
# 1
Don't cross post http://forum.java.sun.com/thread.jspa?threadID=765593
nantucketa at 2007-7-14 22:14:10 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...