Q 1 : What will be the output? Choose the one below: 0 0 0 ArrayIndexoutOfBoundsException NullPointerException null null null Q 2 : Which of the following are valid array declarations? int arr[] = new int[]; float arr[10] = new fl double []arr = new double[10]; None Of the Above. Q 3 : What will …
OCAJP FAQs
How many OCAJP 7 exam questions? There are total 90 questions will be asked in the OCAJP 7 (1Z0-803). It is the entry level example in the Java Certification path. The questions which are asked as part of this exam is fundamentals of Java and not much programming or real time experience is required to …
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 …
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 …
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 …