-
Which of the following methods defined in Thread class are static?
a) sleep() b) join() c) start() d) yield()
-
-
-
What is the difference between an if statement and a switch statement
The if statement is used to select among two alternatives. It uses a boolean expression todecide which alternative should be executed. The switch statement is used to select among multiple alternatives. It uses an int expression to determine which alternativeshould be executed.
-
Which package is always imported by default
The java.lang package is always imported by default.
-
What is the difference between a break statement and a continue statement
A break statement results in the termination of the statement to which it applies (switch,for, do, or while). A continue statement is used to end the current loop iteration andreturn control to the loop statement.