0

web technology Online Quiz - 170

Description: web technology Online Quiz - 170
Number of Questions: 20
Created by:
Tags: web technology
Attempted 0/20 Correct 0 Score 0

What substance is sometimes added to water while using it to extinguish a fire?

  1. SodiumChloride.

  2. PotassiumCarbide.

  3. GunPowder

  4. None of the above


Correct Option: C

what did Johannes Gutenberg invent ?

  1. cotton gin

  2. morse code

  3. printing machine

  4. microscope


Correct Option: C

Milk appears to be White in colour because:

  1. absorbs light

  2. contains proteins

  3. contains sugar

  4. reflects the incident light


Correct Option: D

WRONG QUESTION IGNORE

  1. The code will generate a run time error

  2. undefined, Local Date & Time.

  3. The code will generate a compile time error.

  4. Universal Date & Time, Local Date & Time.

  5. Local Date & Time & Local Date & Time


Correct Option: D

What does session.createQuery("Query").scroll() return ?

  1. ListResultSet

  2. ResultSet

  3. ScrollableResultSet

  4. ScrollableResult


Correct Option: D
Explanation:

To understand what session.createQuery("Query").scroll() returns, the user needs to have understanding of Hibernate, Java and SQL.

Explanation of each option:

A. ListResultSet: This option is incorrect because ListResultSet is not a valid class in Hibernate.

B. ResultSet: This option is incorrect because ResultSet is a class in Java that represents a table of data representing a database result set, and it is not returned by the scroll() method in Hibernate.

C. ScrollableResultSet: This option is incorrect because ScrollableResultSet is not a valid class in Hibernate.

D. ScrollableResult: This option is correct. The scroll() method in Hibernate returns a ScrollableResult object, which is used to traverse a result set. It provides methods to move the cursor forward and backward, as well as methods to retrieve the current row or a subset of rows.

Therefore, the answer is: D. ScrollableResult.

How are the individual properties mapped to different table columns?

  1. By using multiple elements inside the element.

  2. By using multiple elements inside the element.

  3. By using multiple elements inside the element.

  4. none of the above


Correct Option: A

What are the most common methods of configuring Hibernate?

  1. By placing hibernate.properties file in the classpath.

  2. Including elements in hibernate.cfg.xml in the classpath.

  3. both 1 and 2

  4. none of the above


Correct Option: C

Is it possible to declare mappings for multiple classes in one mapping file?

  1. True

  2. False


Correct Option: B

AI Explanation

To answer this question, you need to understand the concept of mapping files in programming.

Option A) True - This option is incorrect. It is not possible to declare mappings for multiple classes in one mapping file.

Option B) False - This option is correct. It is not possible to declare mappings for multiple classes in one mapping file. Each class typically has its own separate mapping file.

The correct answer is B. It is not possible to declare mappings for multiple classes in one mapping file.

How to create SessionFactory ?

  1. configuration.buildSessionFactory();

  2. configuration.createSessionFactory();

  3. configuration.createNewSessionFactory();

  4. none of the above


Correct Option: A

How to get a session object ?

  1. SessionFactory.getSession();

  2. SessionFactory.openSession();

  3. SessionFactory.get();

  4. (session)SessionFactory.getObject();


Correct Option: B

What is the root level element in a hibernate mapping file?

  1. none of the above


Correct Option: A

Which statement is correct ?

  1. A Session will not obtain a JDBC Connection (or a Datasource) unless it is needed

  2. A Session will obtain a JDBC Connection (or a Datasource) on object create

  3. A Session has no relation with JDBC Connection (or a Datasource)

  4. none of the above


Correct Option: A

Which is the name of the Hibernate object state after session close?

  1. Transient

  2. Persistent

  3. Detached

  4. attached


Correct Option: C

what is the default value of lazy in hibernate ?

  1. lazy=false;

  2. lazy=true;

  3. lazy=yes;

  4. lazy=no;


Correct Option: B

What was the original name of the JavaScript programming language when it was first being developed at Netscape?

  1. Mocha

  2. LiveScript

  3. ECMAScript

  4. JScript


Correct Option: A

Which of the following is NOT a valid HTTP request method?

  1. POST

  2. ENCRYPT

  3. PUT

  4. DELETE


Correct Option: B

Every browser identifies itself to Web servers with a unique user agent string. What was the user agent string for Netscape Navigator 1.0, one of the earliest Web browsers?

  1. NNav

  2. Mosaic

  3. Mozilla

  4. MSIE


Correct Option: C

Which of the following markup language specifications is least like the others?

  1. HTML 4.01

  2. HTML 1.0

  3. XHTML 2.0

  4. HTML 5.0


Correct Option: A

Which company invented the banner ad?

  1. CKS Group

  2. Netscape

  3. Organic

  4. USWeb


Correct Option: C

What was the first Web browser with a graphical user interface to be released for mainstream PCs?

  1. NCSA Mosaic

  2. Lynx

  3. Netscape Navigator

  4. Erwise


Correct Option: D
- Hide questions