Classes and Objects interview questions We know a class is a model for creating objects. this means the properties and actions of the objects are written in the class. Properties are represented by variables and actions of the objects are represented by methods. So a class contains variables and methods. The same variables and methods […]
Day: April 3, 2016
Different ways to create java objects
Different ways to create java objects In this article we are explaining the various ways to create java objects. Java Objects can be created in four ways 1) Using new Operator Employee obj = new Employee(); Here, we are creating Employee class object ‘obj’ using new operator. 2) Using factory methods NumberFormat obj = NumberFormat.getNumberInstance(); […]
Different ways to specify hibernate configuration property values
Different ways to specify hibernate configuration property values In this post I am going to explaining what are the different ways to specify hibernate configuration property values. In the hibernate there are three ways to load the hibernate property values. By using xml file (hibernate.config.xml) By using setProperty() method of configuration By using properties […]
One of the IT Companies Java Interview Questions and Answers-1
One of the IT Companies Java Interview Questions and Answers-1 1) How many objects will be created for the following scenario? Integer a1=10; Integer a1=10; Integer a1=20; Integer a1=15; Ans: 3 objects will be created. Explanation: Java storing value in the cache and while initialization will check in the cache, if it is exist […]
Hibernate Sample Program
Hibernate Sample Program In this post, I am going to explaining hibernate sample program and what type of files are required to create hibernate sample program. Different types of files are required to develop the hibernate sample program. They are Hibernate Jars Hibernate Configuration file Hibernate Mapping file POJO Class Client Application 1) Hibernate […]