Java Basic
- Which one of the following contains date information?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
java.sql.Time contains only time. Whereas, java.sql.TimeStamp contains both time and date.
- Which of the following is advantage of using PreparedStatement in Java?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
PreparedStatement in Java improves performance and also prevents from SQL injection.
- Which of the following is advantage of using JDBC connection pool?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
Since the JDBC connection takes time to establish. Creating connection at the application start-up and reusing at the time of requirement, helps performance of the application.
- Which of the following contains both date and time?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
java.util.date contains both date and time. Whereas, java.sql.date contains only date.
- How to specify autowiring by name?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
Different beans of the same class are identified by name.