> how would i go about something like that?
I am guessing that your program will not compile... something like this:
% cat HelloWorld.java
public class HelloWorld {
public static void main(String args[]) {
System.out.println("Hello, world!");
java.lang.Thread.sleep(500);
}
}
% javac -g HelloWorld.java
HelloWorld.java:5: unreported exception java.lang.InterruptedException; must be caught or declared to be thrown
java.lang.Thread.sleep(500);
^
1 error
Refer to this section of the Tutorial for an explanation:
Exception Handling Statements
http://java.sun.com/docs/books/tutorial/java/nutsandbolts/exception.html
Hope this helps.
"Troubleshooting Guide for J2SE 5.0",
http://java.sun.com/j2se/1.5/pdf/jdk50_ts_guide.pdf