0

web technology Online Quiz - 30

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

Is the Session threadsafe in Hibernate ?

  1. TRUE

  2. FALSE

  3. No matter

  4. None of the above


Correct Option: B

How can you make a property be read from the database but not modified in anyway

  1. By using the insert="false" and update="false" attributes.

  2. By using the isinsert="false" and isupdate="false" attributes

  3. By using the isinsert="no" and isupdate="no" attributes

  4. None


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

How to enable query cache in hibernate

  1. hibernate.cache.query_cache true

  2. hibernate.cache.use_query_cache true

  3. hibernate.cache.query_cache yes

  4. none


Correct Option: B

If you are not certain that a matching row exists in the database then which method is the best ?

  1. Session.load();

  2. Session.get();

  3. Session.fetch();

  4. None of the above


Correct Option: B

Which statement is correct?

  1. bag has index column

  2. bag permits duplicate element values

  3. bag does not permits duplicate element values

  4. None


Correct Option: B

AI Explanation

To answer this question, you need to understand the concept of a bag data structure.

A bag is a collection of elements where duplicate elements are allowed. Therefore, the correct statement is:

Option B) A bag permits duplicate element values - This statement is correct because a bag allows multiple occurrences of the same element.

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 know about Hibernate and its query methods.

Hibernate is an ORM (Object-Relational Mapping) library that provides an interface between Java classes and SQL databases. It provides several query methods to interact with the database, including session.createQuery().

session.createQuery("Query").scroll() method is used to iterate over a large number of objects without loading them all into memory at once. It returns a ScrollableResults object that can be used to scroll through the results one at a time.

Now, let's go through each option and explain why it is right or wrong:

A. ListResultSet: This option is incorrect because there is no such class as ListResultSet in Hibernate.

B. ResultSet: This option is incorrect because session.createQuery("Query").scroll() does not return a ResultSet object. Hibernate uses a different interface called ScrollableResults for scrolling through large datasets.

C. ScrollableResultSet: This option is incorrect because there is no such class as ScrollableResultSet in Hibernate.

D. ScrollableResult: This option is correct. session.createQuery("Query").scroll() returns a ScrollableResult object that can be used to scroll through the results one at a time.

Therefore, the answer is: D. ScrollableResult.

How can the mapping files be configured in Hibernate?

  1. Mapping files can be added to Configuration in the application code

  2. They can be configured in hibernate.cfg.xml using the elements

  3. both a and b

  4. none of the above


Correct Option: C

It is possible to re-load an object and all its collections at any time, using the xxxx() method. This is useful when database triggers are used to initialize some of the properties of the object.What is the xxxx() method ?

  1. refresh();

  2. flush();

  3. fetch();

  4. load()


Correct Option: A

The dmcl.ini specifies?

  1. Content Server Information

  2. Application Server Information

  3. Connection Broker Information

  4. Database Information


Correct Option: C

For every webservice developed, the corresponding ___________ document is distributed to the clients.

  1. WSDL

  2. SOAP

  3. UDDI

  4. HTTP


Correct Option: A

AJAX stands for?

  1. Aysnchronous Javascript and XML

  2. Application Javascript and XML

  3. Asynchronous JDK and XML

  4. Application JDK and XML


Correct Option: A

AI Explanation

To answer this question, you need to understand the concept of AJAX (Asynchronous JavaScript and XML).

Option A) Aysnchronous Javascript and XML - This option is correct because AJAX stands for Asynchronous JavaScript and XML. It is a technique used in web development to allow web pages to update asynchronously by exchanging data with the server in the background. It uses JavaScript to make asynchronous requests to the server and XML or JSON to handle the data returned from the server.

Option B) Application Javascript and XML - This option is incorrect because it does not accurately represent the acronym AJAX.

Option C) Asynchronous JDK and XML - This option is incorrect because it does not accurately represent the acronym AJAX. JDK stands for Java Development Kit, which is unrelated to AJAX.

Option D) Application JDK and XML - This option is incorrect because it does not accurately represent the acronym AJAX. JDK stands for Java Development Kit, which is unrelated to AJAX.

The correct answer is A) Aysnchronous Javascript and XML because it accurately represents the acronym AJAX and describes its purpose in web development.

What is the size of a .Net object ?

  1. 4 bytes

  2. 2 bytes

  3. 6 bytes

  4. 1 byte


Correct Option: C

_______________ Involves writing the executable code for an application in such a way that makes it culture-neutral and language-neutral.

  1. Localization

  2. Globalization

  3. Translate

  4. Nationalize


Correct Option: B

______________ Assemblies are resource-only assemblies that contain only culture-specific resources?

  1. Public

  2. Satellite

  3. Private

  4. None


Correct Option: B

___________ Error is returned to any browser attempting to directly request a configuration file.

  1. HttpAccess 404

  2. HttpAccess 405

  3. HttpAccess 403

  4. HttpAccess 406


Correct Option: C

Web.config files are _______. The Machine.config file is _____.

  1. Required, required

  2. Required, Optional

  3. Optional, Optional

  4. Optional, Required


Correct Option: D

Whenever the "&&" operator is used, such as in: exp1 && exp2 where exp1 and exp2 are boolean expressions, both the boolean expressions are not always evaluated

  1. True

  2. False


Correct Option: A

AI Explanation

To answer this question, you need to understand how the "&&" operator works in boolean expressions.

The "&&" operator is known as the logical AND operator. It returns true if both of its operands are true, and false otherwise.

In the expression "exp1 && exp2", the "&&" operator uses short-circuit evaluation. This means that if the value of exp1 is false, the value of exp2 is not evaluated because the overall result of the expression will already be false. This is because for the logical AND operator to return true, both operands must be true.

Therefore, when using the "&&" operator, if exp1 evaluates to false, exp2 is not evaluated, thus saving unnecessary computation.

Hence, the statement "both the boolean expressions are not always evaluated" is true.

The correct answer is A) True.

An array in the Java programming language has the ability to store many different types of values.

  1. True

  2. False


Correct Option: B

Consider the following code: int x, y, z; y = 1; z = 5; x = 0 - (++y) + z++; After execution of this, what will be the values of x, y and z?

  1. x = 4, y = 1, z = 5

  2. x = -7, y = 1, z = 5

  3. x = 4, y = 2, z = 6

  4. x = 3, y = 2, z = 6


Correct Option: D
- Hide questions