InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 51. |
Which Classes Of Exceptions May Be Caught By A Catch Clause In Java Programming? |
|
Answer» A catch clause can catch any exception that MAY be assigned to the THROWABLE TYPE. This INCLUDES the Error and Exception types. A catch clause can catch any exception that may be assigned to the Throwable type. This includes the Error and Exception types. |
|
| 52. |
If The A Class Is Declared Without Any Access Modifiers, Where May The Class Be Accessed In Java Programming? |
|
Answer» 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. 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. |
|
| 53. |
Define Map Interface In Java Programming? |
|
Answer» The Map interface replaces the JDK 1.1 Dictionary class and is used associate KEYS with VALUES. The Map interface replaces the JDK 1.1 Dictionary class and is used associate keys with values. |
|
| 54. |
Does A Class Inherit Constructors Of Its Superclass In Java Programming? |
|
Answer» A CLASS does not INHERIT CONSTRUCTORS from any of its superclasses. A class does not inherit constructors from any of its superclasses. |
|
| 55. |
Explain The Difference Between Reader/writer Class Hierarchy And The Inputstream/outputstream Class Hierarchy In Java Programming? |
|
Answer» The Reader/Writer CLASS HIERARCHY is character-oriented, and the InputStream/OutputStream class hierarchy is byte-oriented. The Reader/Writer class hierarchy is character-oriented, and the InputStream/OutputStream class hierarchy is byte-oriented. |
|
| 56. |
How A Gui Component Handle Its Own Events In Java Programming? |
|
Answer» A component can handle its own EVENTS by implementing the required event-LISTENER interface and ADDING itself as its own event listener. A component can handle its own events by implementing the required event-listener interface and adding itself as its own event listener. |
|
| 57. |
What Advantage Do Java's Layout Managers Provide Over The Traditional Windowing Systems? |
|
Answer» 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. 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. |
|
| 58. |
Described The Elements Of A Gridbaglayout Organized In Java Programming? |
|
Answer» The elements of a GridBagLayout are organized ACCORDING to a grid. However, the elements are of different SIZES and may occupy more than one ROW or COLUMN of the grid. In addition, the rows and columns may have different sizes. The elements of a GridBagLayout are organized according to a grid. However, the elements are of different sizes and may occupy more than one row or column of the grid. In addition, the rows and columns may have different sizes. |
|
| 59. |
Does The Garbage Collection Guarantee That A Program Will Not Run Out Of Memory? |
|
Answer» No, it doesn't. It is possible for programs to use up memory resources FASTER than they are garbage COLLECTED. It is also possible for programs to CREATE OBJECTS that are not SUBJECT to garbage collection. No, it doesn't. It is possible for programs to use up memory resources faster than they are garbage collected. It is also possible for programs to create objects that are not subject to garbage collection. |
|
| 60. |
Can You Please Explain The Difference Between Boolean & Operator And The && Operator In Java Programming? |
|
Answer» If an EXPRESSION involving the Boolean & operator is EVALUATED, both operands are evaluated. Then the & operator is applied to the OPERAND. When an expression involving the && operator is evaluated, the first operand is evaluated. If the first operand returns a value of true then the second operand is evaluated. The && operator is then applied to the first and second operands. If the first operand EVALUATES to false, the evaluation of the second operand is skipped. Operator & has no CHANCE to skip both sides evaluation and && operator does. If an expression involving the Boolean & operator is evaluated, both operands are evaluated. Then the & operator is applied to the operand. When an expression involving the && operator is evaluated, the first operand is evaluated. If the first operand returns a value of true then the second operand is evaluated. The && operator is then applied to the first and second operands. If the first operand evaluates to false, the evaluation of the second operand is skipped. Operator & has no chance to skip both sides evaluation and && operator does. |
|
| 61. |
Described Heavy Weight Components Mean In Java Programming? |
|
Answer» Heavy WEIGHT components like ABSTRACT Window Toolkit (AWT), depend on the local windowing toolkit. For example, java.awt.Button is a heavy weight component, when it is running on the Java platform for Unix platform, it maps to a real Motif button. In this relationship, the Motif button is called the PEER to the java.awt.Button. If you create two Buttons, two peers and hence two Motif Buttons are also CREATED. The Java platform communicates with the Motif Buttons using the Java Native Interface. For each and every component added to the application, there is an additional overhead TIED to the local windowing system, which is why these components are called heavyweight. Heavy weight components like Abstract Window Toolkit (AWT), depend on the local windowing toolkit. For example, java.awt.Button is a heavy weight component, when it is running on the Java platform for Unix platform, it maps to a real Motif button. In this relationship, the Motif button is called the peer to the java.awt.Button. If you create two Buttons, two peers and hence two Motif Buttons are also created. The Java platform communicates with the Motif Buttons using the Java Native Interface. For each and every component added to the application, there is an additional overhead tied to the local windowing system, which is why these components are called heavyweight. |
|