According to the specification, which of the two, Runnable interface and Thread class, is preferred if you only intend to implement the run method? Why?
What will be an ideal response?
For good programming practice, the Runnable interface should be used if only the run method needs to be defined. A subclass of the Thread class should only be used if the program requires the modification or enhancement of the base class (that is, if the program needs to add variables and/or methods that are not in the Thread class).
You might also like to view...
The table marked 3 in the accompanying figure has a rules value of ____.
A. all B. groups C. rows D. void
The ______ method specifies the file from which an image is loaded.
a) Random.Next b) Image.FromFile c) Directory.GetCurrentDirectory d) None of the above.
____ means that a DNS server that has a large number of entries in its zones can load those entries as a background process.
A. Demand zone loading B. Dynamic zone loading C. Background zone loading D. Secondary zone loading
Which of the following best describes dumpster diving?
A. When a person literally scavenges for private information in the garbage B. When a malicious individual leaves infected removable media lying in the garbage C. When an unauthorized person tags along with an authorized person to gain entry to a restricted area D. When a person looks for important data by phishing in a lake