0
Alien head

programming languages Online Quiz - 72

Description: programming languages Online Quiz - 72
Number of Questions: 20
Created by:
Tags: programming languages
Attempted 0/20 Correct 0 Score 0

Select the output of the following SQL statement : SELECT RPAD(name,10,'x') from client_table where name='TEST';

  1. xxxxxxTEST

  2. TESTxxxxxx

  3. ' TEST'

  4. 'TEST '


Correct Option: B

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

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

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

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

  1. ListResultSet

  2. ResultSet

  3. ScrollableResultSet

  4. ScrollableResult


Correct Option: D

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

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

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

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 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

Is the Session threadsafe in Hibernate ?

  1. TRUE

  2. FALSE

  3. No matter

  4. None of the above


Correct Option: B

What does session.evict() method do ?

  1. Remove the object and its collections from the first level cache

  2. Remove the object and its collections from the second level cache

  3. Remove the object and its collections from the data base

  4. None of the above


Correct Option: A

Which statement is correct ?

  1. session.contains() method to determine if an instance belongs to the session cache.

  2. session.contains() method to determine if an instance belongs to the data base

  3. Both are correct

  4. none of the above


Correct Option: A

Does hibernate allow mixing table-per-class hierarchy and table-per-subclass strategies?

  1. Yes

  2. No

  3. Can't say

  4. None of the above


Correct Option: B

Please select right set of technologies that are required for implementing Dynamic Content or DHTML in your application

  1. HTML

  2. CSS

  3. Javascript

  4. Ajax


Correct Option: A,B

parseJSON is a standard function available in javascript like alert, eval and others.

  1. True

  2. False


Correct Option: B

One can add custom method and properties to objects in javascript without using prototype as well.

  1. True

  2. False


Correct Option: B

The following piece of javascript code is going to work fine. function tryVariableArguments() { var intCnt = 0; for (intCnt = 0; intCnt < tryVariableArguments.arguments.length; intCnt++) { alert(tryVariableArguments.arguments[intCnt]); } } Trial Page tryVariableArguments('1','2','3'); tryVariableArguments('1','2'); tryVariableArguments();

  1. True

  2. False


Correct Option: B

onUnload event of Javascript is fired in which of the following conditions

  1. When browser is closed

  2. When the page reloads as well.

  3. Only when you navigate out of the page.

  4. All Of the Above


Correct Option: D

window.location.href="www.google.com". The given statement when executed would result in one of the following:

  1. It will give an error

  2. It will execute and nothing will happen

  3. It will execute and www.google.com is going to open

  4. None of The above


Correct Option: C
+ View questions