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.
Questions
Which of the following is not a C# Keyword?
- Implements
- public
- delegate
- if
The statement that is used to replace multiple if statement is called
- The switch & case statement
- ?:(ternary operator)
- The nestedif statement
- The #endif Statement
What is the default access specifier for a top-level Class, which are not nested into other classes?
- Public
- Private
- Protected
- Internal
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?
- continue;
- break;
- return "Infant";
- return 0;
- return;
If a method is marked as protected internal who can access it?
- Access is limited to the current assembly.
- Access is limited to the containing class or types derived from the containing class.
- Access is limited to the containing type
- Access is limited to the current assembly or types derived from the containing class
The default type of enum is integer and has a default value 1
- True
- False
Unboxing of null reference type will return a null
- true
- false
- an exception is thrown
- None of these
Which of these string definition will prevent escaping on backslashes in C#?
- string s= #"Test string";
- string s= ."Test string";
- string s= @"Test string";
- string s= &"Test string";
Can multiple catch blocks be executed for single try statement?
- True
- False
Which of the following are most common configuration methods of Hibernate Configuation
- Mapping files
- http.conf
- XML Configuration hibernate.cfg.xml
- web.config
Which of the following is FALSE about Session in hibernate
- Session is a light weight non-threadsafe object
- You can share the session between threads
- Session represents a single unit-of-work with the database
- Session is the primary interface for the persistence service
- A session loads database connections using lazy-loading
Which of the following are tags of hibernate.cfg.xml? Select all that apply
- DTD
- JDBC Connection
- SQL Variant to generate
- Mapping files
- Size of the database
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
- Configuration interface
- Session interface
- Query and Criteria interfaces
- User interface
Which of the following is NOT a role of the session interface?
- Holds a mandatory (first-level) cache of persistent objects, used when navigating the object graph or looking up objects by identifier
- Created during application initialization
- Wraps a JDBC connection
- Act as session Factory
Which of the following is NOT a step in the Hibernate communication with RDBMS?
- Create HQL Query
- Execute query to get list containing Java objects
- Load the Hibernate configuration file and create configuration object
- Create session from configuration object
- Get one session from the session factory
Which of the following is not a Session method?
- Session.saveorupdate()
- Session.remove()
- Session.load()
- Session.save()
What are the benefits of ORM and Hibernate?
- Productivity
- Maintainability
- Vendor dependence
- Performance
What is the file extension you use for hibernate mapping file?
- filename.hbm.xml
- filename.cfg.xml
- filename.hmb.xml
- filename.cfg.hbm.xml
Below Code is TRUE (=Correct)/FALSE (=Wrong)? BEGIN SELECT PROJECT_ID FROM PA_PROJECTS_ALL WHERE PROJECT_ID IN (12345); END;
- True
- False
WCF service author Can configure authorization with PrincipalPermissionMode setting in ServiceAuthorization behavior. Please select the invalid for?
- UseWindowsGroups
- UseAspNetRoles
- UseNetworkUser
- None