2022 Aoop
2022 Aoop
10. False - Checked exceptions are not runtime exceptions; they are
checked at compile-time.
Choose
Question 1
Explanation:
In JavaFX, every application must extend the Application class. This
class provides the essential structure and life cycle methods such as
start(Stage primaryStage), which is the entry point for JavaFX
applications.
Question 2
Explanation:
The Image class in JavaFX is used to load images into memory. It can
be used in conjunction with ImageView to display the image in a
JavaFX application.
Question 3
Explanation:
HBox is a layout manager in JavaFX that arranges its children in a
single horizontal row. If you need a layout that arranges components
horizontally, HBox is the right choice.
Question 4
This is one or more statements that are always executed and usually
used to close resources.
Question 5
Explanation:
The extends keyword in Java is used to create a subclass from a
superclass, indicating inheritance.
Question 6
Explanation:
Method overriding in Java occurs when a subclass has a method with
the same name, return type, and parameters as a method in its
superclass, allowing the subclass to provide a specific
implementation.
Question 7
Explanation:
PreparedStatement offers several advantages: it allows you to pass
parameterized SQL statements, reuse the statement with different
values, and supports precompiled SQL statements, enhancing
execution time.
Question 8
Explanation:
Custom exceptions in Java are created by extending the Exception
class, allowing developers to create specific exceptions that suit their
application’s needs.
Question 9
Explanation:
PrintWriter is a character-based I/O class in Java, used for writing
text to an output stream, while FileInputStream, FileOutputStream,
and BufferedInputStream are byte-based I/O classes.
Question 10
Explanation:
In JDBC, a ResultSet object contains the results of executing an SQL
SELECT query, allowing you to retrieve and process the data returned
by the database.
Question 11
Explanation:
When a FileWriter is created with a filename, and the file already
exists, the existing file is overwritten, effectively erasing its contents
and creating a new, empty file.
Question 12
Answer = A
Question 13
Answer = A
In InetAddress class which method returns the host name of the IP
Address?
Question 14
Answer = B
Which of the following method is used to retrieve data from
database in JDBC?
Question 15
Answer = C
Question 16
Answer = C
Question 17
Answer = B
Question 18
Answer = A
Question 19
Answer = B