JDBC, Java Server Pages, and MySQL Questions and Answers

Take Exam

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

1. How many JDBC driver types does Sun define?

  • One
  • Two
  • Three
  • Four
Show Answer Report

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.
Show Answer Report

3.  Who invented Java?

  • Netscape
  • Microsoft
  • Sun
  • None of the above is correct.
Show Answer Report

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
Show Answer Report

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
Show Answer Report

6.  ________ is an open source DBMS product that runs on UNIX, Linux and Windows.

  • MySQL
  • JSP/SQL
  • JDBC/SQL
  • Sun ACCESS
Show Answer Report

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.
Show Answer Report

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.
Show Answer Report

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.
Show Answer Report

10. A JSP is transformed into a(n):

  • Java applet.
  • Java servlet.
  • Either 1 or 2 above.
  • Neither 1 nor 2 above.
Show Answer Report
Questions and Answers for Competitive Exams Various Entrance Test