OCAJP 7 Exam Syllabus


OCAJP 7 Exam Topics List Java Basics Define the scope of variables Define the structure of a Java class Create executable Java applications with a main method Import other Java packages to make them accessible in your code Working With Java Data Types Declare and initialize variables Differentiate between object reference variables and primitive variables […]

JPA Vs Hibernate


I have come across this question from many of our readers and who ever working on the hibernate framework : What is the difference between Java Persistence API (JPA) and Hibernate ORM Framework. This post simply answer to those who are confusing with JPA and Hibernate difference. JPA and Hibernate Difference JPA is a specification for […]

Difference Between Class.forName() and ClassLoader.loadClass()


Class.forName() and ClassLoader.loadClass(), both the classes dynamically loading the classes to the classpath. However, there are subtle difference on initializing the classes at the time of loading and from where it is loaded. This tutorials compares both the form of class loading with simple examples. Class.forName() By default the classes are initialized at the time […]

JPA 2 Tutorials


Java Persistance API (JPA) is the object relational mapping (ORM) specification for Java EE applications. JPA 2 is the second major release for the JPA framework with lot of interesting features. Many of the features introduced with this release are already supported by the many of the framework vendors like Hibernate, EclipseLink, etc. This JPA 2 […]

JPA 2 Criteria API


One of the important feature in JPA 2.0 is using the Criteria API for forming the SQL queries. If you would have worked with the JPA 1.0 version, you must be familiar with the Java Persistence Query Language (JQL) which is similar to writing the SQL queries. This approach is good for the developers who are […]

TypedQuery in JPA 2


One of the new feature introduced in JPA 2.0 is using the TypedQuery interface for building the query. This can be used with the CriteriaBuilder in JPA 2. As the name itself specifies, the main purpose of using the TypedQuery would be to narrow the result type and eliminate the need for type casting after […]

JPA Releases and Implementations


Java Persistence API (JPA) is the database layer specification created and maintained by the Java experts group. The first release of JPA happened on the year 2006. Also there is a number of popular implementation for the JPA specifications. EclipseLink is the reference implementation for the JPA. If you are not familiar with JPA programming, […]

How To Create EntityManagerFactory in JPA


This tutorial explains how to create EntityManagerFactory in your JPA application when you are writing your first JPA programming. It is the standard way of creating the factory if you use the JPA specification. Normally there are two ways to create the factory, one is through the configuration file persistence.xml and another one is through the […]

JPA EntityManagerFactory Vs Hibernate’s SessionFactory


If you are using the JPA’s standard specification implementation (Read : Introduction to JPA), then you would use EntityManagerFactory for opening the session. But, if you are using the hibernate implementation, you have hibernate specific SessionFactory for managing the sessions. Here there is lot of confusion between developers like which one is the best approach. […]

How To Generate Javadoc With Ant


This tutorial explains how to create Java documentation using the ant script. Every project has Java doc for the documentation purpose. If you have huge application, there should be a clear Java doc for the developers to aware of all the classes and its purposes. If the developers add good comments on their code, Java […]