Home > Web Development > Quizzes > Web Development using Java (Intermediate Level) Practice Test Questions
Web Development using Java (Intermediate Level) Practice Test Questions
Fast practice, instant feedback. Timer auto-submits when time’s up.
Avg score: 50% Most missed: “Which element declares a filter inside deployment descriptor?”
Web Development using Java (Intermediate Level) Practice Test Questions
Time left 00:00
25 Questions

1. Which of the following describes the correct sequence of the steps involved in making a connection with a database. 1. Loading the driver 2. Process the results. 3. Making the connection with the database. 4. Executing the SQL statements.
2. Can you pass List to a method which accepts List?
3. Which statement is static and synchronized in JDBC API?
4. Which of the following is not a valid Listener related to session?
5. Which two methods you need to implement to use an Object as key in HashMap?
6. Which of the following type of JDBC driver, is also called Type 1 JDBC driver?
7. Which method of ServletContextListener is invoked when an Servlet Application is initialized?
8. Which of the following type of JDBC driver, calls native code of the locally available ODBC driver?
9. Which type of driver provides JDBC access via one or more ODBC drivers?
10. What statements are correct about JDBC transactions (2 correct answers)?
11. Which type of Statement can execute parameterized queries?
12. Which method is used to perform some action when the object is to be destroyed?
13. Which of the following stements are incorrect?
14. The JDBC-ODBC bridge is
15. Which of the following is correct about JDBC?
16. What happens if you call the method close() on a ResultSet object?
17. Which methods are utilized to control the access to an object in multi-threaded programming?
18. What servlet processor was developed by Apache Foundation and Sun?
19. Which method returns a string containing the unique session id?
20. What is the output of this program? class selection_statements { public static void main(String args[]) { int var1 = 5
int var2 = 6
if ((var2 = 1) == var1) System.out.print(var2)
else System.out.print(++var2)
} }
21. What will happen when you attempt to compile and run the following code? int Output = 10
boolean b1 = false
if((b1 == true) && ((Output += 10) == 20)) { System.out.println(We are equal " + Output)
} else { System.out.println("Not equal! " + Output)
}
"
22. In which of the following type of ResultSet, the cursor can scroll forwards and backwards, and the result set is sensitive to changes made by others to the database that occur after the result set was created?
23. Which method returns the time when the session was created?
24. What is the output of this program? class main_class { public static void main(String args[]) { int x = 9;
if (x == 9) { int x = 8
System.out.println(x)
} } }
25. What is the output of this program? class bitwise_operator { public static void main(String args[]) { int var1 = 42
int var2 = ~var1
System.out.print(var1 + " + var2)
} }"