FREE Sun Certified Java Programmer MCQ Questions and Answers

0%

Which of the following claims regarding garbage collection in Java is accurate?

Correct! Wrong!

Which of the following methods can modify a String object, s?

Correct! Wrong!

Which subclass(es) of Component in the following list cannot be instantiated directly:

Correct! Wrong!

In Java, the following subclasses of Component cannot be directly instantiated as a Container:

What causes a thread's execution to halt?

Correct! Wrong!

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.

Which of the following initialization strategies for the array "dayhigh" with seven values is correct?

Please select 2 correct answers

Correct! Wrong!

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.

Which procedures are necessary to implement the Runnable interface.

Correct! Wrong!

In Java, if a class implements the Runnable interface, it is required to provide an implementation for the run() method defined in that interface.

If a variable-width font is used to create the string text for a column, the column's starting size is:

Correct! Wrong!

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.

Premium Tests $49/mo
FREE December-2024