93.7k views
13 votes
Pls help ...

Consider the code given below:
public class Testone {
public static void main (String[] args) throws Exception {
Thread.sleep (3000);
System.out.println("sleep");
}
)
What is the result?
Select one:
a. The code executes normally and prints "sleep".
b. The code executes normally, but nothing is printed.
a
C. A RuntimeException is thrown at runtime
d. Compilation fails
e. An exception is thrown at runtime.
Next pag​

User Rengas
by
3.7k points

1 Answer

10 votes

Answer:

  • You open the class, and print sleep after thread 3000
  • So A
User Timbram
by
3.9k points