Hibernate ORM and C# Programming Quiz

Test your knowledge on Hibernate ORM framework in Java and C# programming language concepts including string handling, access modifiers, and exception handling.

20 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

Which of the following is not a C# Keyword?

  1. Implements
  2. public
  3. delegate
  4. if
Question 2 Multiple Choice (Single Answer)

The statement that is used to replace multiple if statement is called

  1. The switch & case statement
  2. ?:(ternary operator)
  3. The nestedif statement
  4. The #endif Statement
Question 3 Multiple Choice (Single Answer)

What is the default access specifier for a top-level Class, which are not nested into other classes?

  1. Public
  2. Private
  3. Protected
  4. Internal
Question 4 Multiple Choice (Single Answer)

The following code will generate a comiler error. Which of the following statement inserted as the last line of the function ,would solve the problem?

  1. continue;
  2. break;
  3. return "Infant";
  4. return 0;
  5. return;
Question 5 Multiple Choice (Single Answer)

If a method is marked as protected internal who can access it?

  1. Access is limited to the current assembly.
  2. Access is limited to the containing class or types derived from the containing class.
  3. Access is limited to the containing type
  4. Access is limited to the current assembly or types derived from the containing class
Question 6 True/False

The default type of enum is integer and has a default value 1

  1. True
  2. False
Question 7 Multiple Choice (Single Answer)

Unboxing of null reference type will return a null

  1. true
  2. false
  3. an exception is thrown
  4. None of these
Question 8 Multiple Choice (Single Answer)

Which of these string definition will prevent escaping on backslashes in C#?

  1. string s= #"Test string";
  2. string s= ."Test string";
  3. string s= @"Test string";
  4. string s= &"Test string";
Question 9 True/False

Can multiple catch blocks be executed for single try statement?

  1. True
  2. False
Question 10 Multiple Choice (Multiple Answers)

Which of the following are most common configuration methods of Hibernate Configuation

  1. Mapping files
  2. http.conf
  3. XML Configuration hibernate.cfg.xml
  4. web.config
Question 11 Multiple Choice (Multiple Answers)

Which of the following is FALSE about Session in hibernate

  1. Session is a light weight non-threadsafe object
  2. You can share the session between threads
  3. Session represents a single unit-of-work with the database
  4. Session is the primary interface for the persistence service
  5. A session loads database connections using lazy-loading
Question 12 Multiple Choice (Multiple Answers)

Which of the following are tags of hibernate.cfg.xml? Select all that apply

  1. DTD
  2. JDBC Connection
  3. SQL Variant to generate
  4. Mapping files
  5. Size of the database
Question 13 Multiple Choice (Multiple Answers)

There are core interfaces are used in just about every Hibernate application. Using these interfaces, you can store and retrieve persistent objects and control transactions. Select all the interfaces that you see

  1. Configuration interface
  2. Session interface
  3. Query and Criteria interfaces
  4. User interface
Question 14 Multiple Choice (Single Answer)

Which of the following is NOT a role of the session interface?

  1. Holds a mandatory (first-level) cache of persistent objects, used when navigating the object graph or looking up objects by identifier
  2. Created during application initialization
  3. Wraps a JDBC connection
  4. Act as session Factory
Question 15 Multiple Choice (Multiple Answers)

Which of the following is NOT a step in the Hibernate communication with RDBMS?

  1. Create HQL Query
  2. Execute query to get list containing Java objects
  3. Load the Hibernate configuration file and create configuration object
  4. Create session from configuration object
  5. Get one session from the session factory
Question 16 Multiple Choice (Single Answer)

Which of the following is not a Session method?

  1. Session.saveorupdate()
  2. Session.remove()
  3. Session.load()
  4. Session.save()
Question 17 Multiple Choice (Multiple Answers)

What are the benefits of ORM and Hibernate?

  1. Productivity
  2. Maintainability
  3. Vendor dependence
  4. Performance
Question 18 Multiple Choice (Single Answer)

What is the file extension you use for hibernate mapping file?

  1. filename.hbm.xml
  2. filename.cfg.xml
  3. filename.hmb.xml
  4. filename.cfg.hbm.xml
Question 19 True/False

Below Code is TRUE (=Correct)/FALSE (=Wrong)? BEGIN SELECT PROJECT_ID FROM PA_PROJECTS_ALL WHERE PROJECT_ID IN (12345); END;

  1. True
  2. False
Question 20 Multiple Choice (Single Answer)

WCF service author Can configure authorization with PrincipalPermissionMode setting in ServiceAuthorization behavior. Please select the invalid for?

  1. UseWindowsGroups
  2. UseAspNetRoles
  3. UseNetworkUser
  4. None