JDBC, Java Server Pages, and MySQL Questions and Answers
The JDBC, Java Server Pages, and MySQL questions with answers topic is ideal for students preparing for software development roles and technical interviews. This section focuses on programming questions and answers that cover database connectivity using JDBC, server-side scripting with JSP, and SQL query handling with MySQL. Commonly asked in TCS, Wipro, Infosys, and Accenture placements, these questions test your understanding of database-driven Java applications. Practicing these problems enhances your skills for programming interview questions with answers and boosts your placement readiness.
JDBC, Java Server Pages, and MySQL
Showing 10 of
20 questions
2. Where is metadata stored in MySQL?
- In the MySQL database metadata
- In the MySQL database metasql
- In the MySQL database mysql
- None of the above is correct.
4. To run a compiled Java program, the machine must have what loaded and running?
- Java virtual machine
- Java compiler
- Java bytecode
- A Web browser
5. Which JDBC driver Type(s) can be used in either applet or servlet code?
- Both Type 1 and Type 2
- Both Type 1 and Type 3
- Both Type 3 and Type 4
- Type 4 only
6. ________ is an open source DBMS product that runs on UNIX, Linux and Windows.
- MySQL
- JSP/SQL
- JDBC/SQL
- Sun ACCESS
7. What is sent to the user via HTTP, invoked using the HTTP protocol on the user's computer, and run on the user's computer as an application?
- A Java application
- A Java applet
- A Java servlet
- None of the above is correct.
8. What MySQL property is used to create a surrogate key in MySQL?
- UNIQUE
- SEQUENCE
- AUTO_INCREMENT
- None of the above -- Surrogate keys are not implemented in MySQL.
9. What is not true of a Java bean?
- There are no public instance variables.
- All persistent values are accessed using getxxx and setxxx methods.
- It may have many constructors as necessary.
- All of the above are true of a Java bean.
10. A JSP is transformed into a(n):
- Java applet.
- Java servlet.
- Either 1 or 2 above.
- Neither 1 nor 2 above.