Question: Question 2 ( 1 0 ) Provide your answer by selecting Question number 2 and selecting the answer under the corresponding EC sub question number.

Question 2(10)
Provide your answer by selecting Question number 2 and selecting the answer under the corresponding EC sub question number.
(2.1) What is the main advantage of using the MVC model in Java's Swing components?
A. It simplifies event handling.
B. It combines the view and controller into a single class.
-C. It separates the state, appearance, and behavior of a component.
D. It eliminates the need for platform-specific code.
(2.2) Which class is the root of all Swing components?
A. java.awt.Component
-B. javax.swing.JComponent
C. java.awt.Container
D. javax.swing.SwingComponent
(2.3) How is platform independence achieved in Swing components?
- A. By using native code for rendering components
B. By using Java to render all components
C. By utilizing different peer models for each platform
D. By relying on the operating system for event handling
(2.4) What does the term "heavyweight component" refer to in Java's GUI programming?
A. Components rendered entirely in Java
B. Components that rely on native code for rendering
C. Components that are resource-intensive
D. Components that are independent of the operating system
(2.5) Which method is invoked when an action is performed in Java's event model?
- A. actionPerformed()
B. handleAction()
C. executeAction()
D. performAction()
(2.6) What is the purpose of the FileReader class?
A. To read binary data from a file
- B. To read character data from a file
C. To write binary data to a file
D. To write character data to a file
(2.7) Which method in the File class checks whether a file is writeable?
A. isWriteable()
.B. canWrite()
C. writeable()
D. exists()
(2.8) What is a primary feature of Java's PrintWriter class?
A. It supports internationalized I/O.
B. It writes binary data as text.
C. It reads binary data from files.
-D. It writes data without buffering.
(2.9) Which class in Java's I/O stream hierarchy is responsible for writing character data to
files?
A. FileOutputStream
B. BufferedOutputStream
-C. FileWriter
D. DataOutputStream
(2.10) What does the flush() method do when working with buffered streams?
Question 2 ( 1 0 ) Provide your answer by

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!