And Mysql(Engineering > Computer Science And Engineering > Database System > Jdbc > Java Server Pages ) Questions and Answers

Question 1. To run a compiled Java program, the machine must have what loaded and running?
  1.    A Web browser
  2.    Java compiler
  3.    Java virtual machine
  4.    Java bytecode
Explanation:-
Answer: Option C. -> Java virtual machine

Question 2. How many JDBC driver types does Sun define?
  1.    Two
  2.    Three
  3.    Four
  4.    One
Explanation:-
Answer: Option C. -> Four

Question 3. Where is metadata stored in MySQL?
  1.    In the MySQL database metadata
  2.    In the MySQL database metasql
  3.    None of these
  4.    In the MySQL database mysql
Explanation:-
Answer: Option D. -> In the MySQL database mysql

Question 4. Who invented Java?
  1.    Sun
  2.    None of these
  3.    Microsoft
  4.    Netscape
Explanation:-
Answer: Option A. -> Sun

Question 5. Which JDBC driver Type(s) can be used in either applet or servlet code?
  1.    Both Type 3 and Type 4
  2.    Both Type 1 and Type 2
  3.    Both Type 1 and Type 3
  4.    Type 4 only
Explanation:-
Answer: Option A. -> Both Type 3 and Type 4

Question 6. ________ is an open source DBMS product that runs on UNIX, Linux and Windows.
  1.    Sun ACCESS
  2.    JDBC/SQL
  3.    JSP/SQL
  4.    MySQL
Explanation:-
Answer: Option D. -> MySQL

Question 7. What is not true of a Java bean?
  1.    There are no public instance variables.
  2.    All of these
  3.    It may have many constructors as necessary.
  4.    All persistent values are accessed using getxxx and setxxx methods.
Explanation:-
Answer: Option C. -> It may have many constructors as necessary.

Question 8. A JSP is transformed into a(n):
  1.    Java applet.
  2.    Either 1 or 2 above.
  3.    Java servlet.
  4.    Neither 1 nor 2 above.
Explanation:-
Answer: Option C. -> Java servlet.

Question 9. What MySQL property is used to create a surrogate key in MySQL?
  1.    UNIQUE
  2.    None of these
  3.    SEQUENCE
  4.    AUTO_INCREMENT
Explanation:-
Answer: Option D. -> AUTO_INCREMENT

Question 10. 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?
  1.    A Java applet
  2.    A Java application
  3.    None of these
  4.    A Java servlet
Explanation:-
Answer: Option A. -> A Java applet