Java and Hibernate Programming Quiz
Test your knowledge of Java programming fundamentals, object-oriented concepts, and Hibernate ORM framework configuration
Questions
Find the true statements, A. Final class cant be inherited. B. Abstract class cant be instantiated. C. Abstract class can be inherited.
- Only A & B
- Only B & C
- Only A & C
- A,B and C
In Object Oriented Programming, the concept of IS-A is based on which of the following?
- Inheritance
- Polymorphism
- Abstraction
- Modularization
Which of the following are mandatory when writing a POJO class?
- Implement a no-argument constructor
- provide an identifier property
- declare accessors for persistent fields
- all the above
The default_entity_mode is set to which mode by default?
- dynamic-map
- dom4j
- pojo
- None of the above
Which of the following attribute of the tag needs to be defined in the mapping xml when the default-entity mode is set to "dynamic-map"
- name
- entity-name
- node
- schema
What does the attribute "batch-size" of the tag specify?
- batch size for fetching instances
- batch size for fetching instances by identifier
- both
- none
For the column name EMP_NAME in table EMP, the column mapping is described as below in the hbm xml. . Is this valid?
- True
- False
What are the different methods of Hibernate Configuration?
- Programmatic configuration
- using hibernate.properties configuration file
- using hibernate.cfg.xml
- all the above
Which tag in hibernate.cfg.xml is used to add a resource hbm xml for the current session factory instance?
- <hibernate-configuration>
- <session-factory>
- <mapping>
- <property>
What are the different approaches to represent an inheritance hierarchy?
- Table per Concrete class
- Table per Sub class
- Table per class Hierarchy
- all of the above
All the bitwise operators have the same level of operator precedence in Java
- True
- False
Two methods cannot have the same in Java
- True
- False
Subclasses of an abstract class that do not provide an implementation of an abstract method are also abstract
- True
- False
A Constructor must always invoke its super class constructors in its first statement
- True
- False
An Array can store many different types of values
- True
- False
when present,package must be the first noncomment statement in the file
- True
- False
Objects are passed to a method by use of call-by-reference
- True
- False
When we implement an interface method,it should be declared as Public
- True
- False
Any class may be inherited by another class in the same package
- True
- False
Every method of a final class is implicitly final
- True
- False