Tag: java

Questions Related to java

  1. In the MySQL databasemetadata

  2. In the MySQL databasemetasql

  3. In the MySQL databasemysql

  4. None of the above is correct.


Correct Option: C
  1. Both Type 1 and Type 2

  2. Both Type 1 and Type 3

  3. Both Type 3 and Type 4

  4. Type 4 only


Correct Option: C

What isnottrue of a Java bean?

  1. There are no public instance variables.

  2. All persistent values are accessed using getxxxand setxxxmethods.

  3. It may have many constructors as necessary.

  4. All of the above are true of a Java bean.


Correct Option: C

A JSP is transformed into a(n):

  1. Java applet.

  2. Java servlet.

  3. Either 1 or 2 above.

  4. Neither 1 nor 2 above.


Correct Option: B

AI Explanation

To answer this question, you need to understand the role of JSP (JavaServer Pages) and its transformation process.

JSP is a technology used to create dynamic web pages. It allows developers to embed Java code within HTML pages, which is then executed on the server side. JSP pages are transformed into Java servlets during the compilation process.

Option A) Java applet - This option is incorrect because JSP pages are not transformed into Java applets. Java applets are client-side programs that run within a web browser and are embedded within HTML pages.

Option B) Java servlet - This option is correct. JSP pages are transformed into Java servlets. Servlets are server-side programs that run on a web server and generate dynamic content to be sent back to the client.

Option C) Either 1 or 2 above - This option is incorrect because JSP pages are specifically transformed into Java servlets and not Java applets.

Option D) Neither 1 nor 2 above - This option is incorrect. JSP pages are transformed into Java servlets, so option D is not the correct answer.

The correct answer is B) Java servlet. This option is correct because JSP pages are transformed into Java servlets during the compilation process.

Which JDBC driver Type(s) can you use in a three-tier architecture and if the Web server and the DBMS are running on the same machine?

  1. Type 1 only

  2. Type 2 only

  3. Both Type 3 and Type 4

  4. All of Type 1, Type 2, Type 3 and Type 4


Correct Option: D
  1. VBScript only

  2. Jscript only

  3. Java only

  4. All of the above are supported


Correct Option: C
  1. Apache Tomcat

  2. Apache Web server

  3. Sun servlet processor

  4. None of the above is correct.


Correct Option: A
  1. A Java application

  2. A Java applet

  3. A Java servlet

  4. None of the above is correct.


Correct Option: C