FREE Sun Certified Java Programmer MCQ Questions and Answers
If a variable-width font is used to create the string text for a column, the column's starting size is:
When using a font with a variable width, the initial size of a column in a user interface or a layout container can be determined by multiplying the number of characters in the string by the average width of a character in that font.
Which of the following methods can modify a String object, s?
Which of the following claims regarding garbage collection in Java is accurate?
Which procedures are necessary to implement the Runnable interface.
In Java, if a class implements the Runnable interface, it is required to provide an implementation for the run() method defined in that interface.
Which subclass(es) of Component in the following list cannot be instantiated directly:
In Java, the following subclasses of Component cannot be directly instantiated as a Container:
Which of the following initialization strategies for the array "dayhigh" with seven values is correct?
Please select 2 correct answers
Both declarations int dayhigh[] = { 24, 23, 24, 25, 25, 23, 21 }; and int[] dayhigh = { 24, 23, 24, 25, 25, 23, 21 }; are correct methods for initializing the array "dayhigh" with 7 values.
What causes a thread's execution to halt?
It's important to note that thread termination should be handled properly to avoid resource leaks or inconsistent program states. Threads should be designed to gracefully handle their termination and clean up any resources they have acquired during execution.