Given: 1. public class TestOne { 2. public static void main (String[] args) throws Exception { 3. Thread.sleep(3000); 4. System.out.println(”sleep”); 5. } 6. } What is the result?
Compilation fails.
An exception is thrown at runtime.
The code executes normally and prints “sleep”.
The code executes normally, but nothing is printed.