-
-
-
-
-
-
-
-
} ">
The following code defines the ThreadSample class. public class ThreadSample implements Runnable { public static void main(String args[]) { System.out.println("This is the ThreadSample object"); }
/ The following code defines the ThreadSample class. public class ThreadSample implements Runnable { public static void main(String args[]) { System.out.println("This is the ThreadSample object"); } public void run() { while (true) { try { Thread.sleep(100); System.out.println("Thread ran."); } catch (Exception e) {} } Referring to the sample...
-
Which one of the following operations is NOT supported by java.lang.Runtime
Choice 1 Request the garbage collector to be active. Choice 2 Add shutdown hooks. Choice 3 Execute native operating system commands. Choice 4 Dynamically unload Class files. Choice 5 Cause the Java Virtual Machine (JVM) to exit.
-
-
-
-
-
-
-
-
-
-
-
Java Interview Questions
Ans