Java has more than 50 keywords for the different operations. Here is the list of all the keywords and its purpose. Keyword Description abstract Abstract keyword can be use with classes and methods to defer the actual implementation to the child classes. assert This keyword used for testing the truth of a condition. boolean Indicates …
Java
Static Keyword
Static keyword in Java used for indicating the members are belong to the class and not to the instance. It means that, if you declare a static members, it is shared among all the instances of that class. Also note that the static members are initialized before the instance creation of that class. Static keyword …
Final Keyword
Final keyword in Java language is used with variables, methods and classes. The general idea behind the use of final is to restrict the manipulation of original value. Variables – The initial value can not be changed once it is assigned. You can initialize the final variable first time, but later it is not allowed …
Abstract Keyword
Abstract keyword is used with class and method declaration. Abstract defines incomplete data structures where the final or complete implementation will be done by its child class. In Java, Abstract used for defining the common behaviour for a class and let the child class to override the common behaviour. Some of the characteristics of the …
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 …
Deprecated @Entity Annotation in Hibernate 4
In the earlier versions of Hibernate, we use @Entity for marking a class as persistence entity in the database. It has list of attributes to be used as the parameters. @Entity has been deprecated from the hibernate 4 and will be removed from the hibernate 5.0 release. There is a confusion in the consistency of …
How To Change Tomcat Default Port Configuration?
Tomcat uses by default on port number 8080 on your computer. It is very common that you would have conflict of port number if there is another service running on the same port. You can change the port number for your tomcat server by changing in the configuration file or through the eclipse editor. 1. …