41⟩ Which invokes a thread's run() method in Java Programming?
After a thread is started, via its start() method or that of the Thread class, the JVM invokes the thread's run() method when the thread is initially executed.
“Java Developer Frequently Asked Questions by expert members with experience in Java Developer. These questions and answers will help you strengthen your technical skills, prepare for the new job test and quickly revise the concepts”
After a thread is started, via its start() method or that of the Thread class, the JVM invokes the thread's run() method when the thread is initially executed.
The purpose of finalization is to give an unreachable object the opportunity to perform any cleanup processing before the object is garbage collected.
An anonymous class may implement an interface or extend a superclass, but may not be declared to do both.
Object class is the superclass for every class in Java Programming.
The Canvas, Frame, Panel, and Applet classes support painting.
A native method is a method that is implemented in a language other than Java.
for(;;)-for loop; while(true)-always true, etc.
Unicode requires 16 bits and ASCII require 7 bits. Although the ASCII character set uses only 7 bits, it is usually represented as 8 bits. UTF-8 represents characters using 8, 16, and 18 bit patterns. UTF-16 uses 16-bit and larger bit patterns.
When a task invokes its yield() method, it returns to the ready state. When a task invokes its sleep() method, it returns to the waiting state.
javax.Swing package. All components in Swing, except JApplet, JDialog, JFrame and JWindow are lightweight components in Java Programming.
The FontMetrics class is used to define implementation-specific properties, such as ascent and descent, of a Font object.
If a thread attempts to execute a synchronized method or synchronized statement and is unable to acquire an object's lock, it enters the waiting state until the lock becomes available.
Under preemptive scheduling, the highest priority task executes until it enters the waiting or dead states or a higher priority task comes into existence. Under time slicing, a task executes for a predefined slice of time and then reenters the pool of ready tasks. The scheduler then determines which task should execute next, based on priority and other factors.
Java uses layout managers to lay out components in a consistent manner across all windowing platforms. Since Java's layout managers aren't tied to absolute sizing and positioning, they are able to accommodate platform-specific differences among windowing systems.
A catch clause can catch any exception that may be assigned to the Throwable type. This includes the Error and Exception types.
A class that is declared without any access modifiers is said to have package or friendly access. This means that the class can only be accessed by other classes and interfaces that are defined within the same package.
The Map interface replaces the JDK 1.1 Dictionary class and is used associate keys with values.
A class does not inherit constructors from any of its superclasses.
The peerless components are called light weight components.
The primitive types are byte, char, short, int, long, float, double, and boolean.