EOFException in Java is thrown when end of file is reached unexpectedly while processing the input. These exceptions are thrown while working the DataInputStream, ObjectInputStream and RandomAccessFile classes. All these classes are using one of the stream classes like FileInputStream for reading the data. When there is no data available in the stream by DataInputStream …
JVM Memory Management
Introduction to Java Memory Management In this article I am going to explain more about the JVM memory management inside Java Virtual Machine (JVM). If you are a Java developer, understanding the Java memory management inside JVM will be much helpful on investigating performance issues related to memory leak, garbage collection, etc. which are critical …
How to Change Log Level Details in Websphere Application Server (WAS)
In this tutorial I am going to explain how to change the log level details in your WebSphere Application Server (WAS). If you are deploying your application to production server, it is always good practice to keep the log level as FATAL or ERROR. We can configure the log levels in Application Server (which will …
Suppressed Exceptions in Java 7
At any point of time only one exception can be thrown by a method per execution. In cases when more than one exception would be thrown from the method, one of them will be suppressed and not thrown by the compiler. This exception is known as the suppressed exceptions in Java. Additional Reading : Java …
Java Exceptions Tutorial
In this tutorial I am going to explain Java exceptions in details and how to use them in the real applications. One of the important measure to assess the quality of your Java code is to review the exception handling and how exceptions scenarios are handled. If you have to write an efficient exception handling, …
OCAJP – Pass by Value or Pass by Reference
One of the most debated topic on Java is whether the method arguments are pass by reference or pass by value. In this tutorial, I would like to explain the same old concept with respect to the OCAJP certification. In Java, everything is pass by value. Here is the exam objective for OCAJP 7 and OCAJP …
Spring and JSON Example
In this example I am going to explain how to get the JSON result in Spring Framework. One of my previous example about content negotiation talks about the same concept. But, here I want to re-visit the same topic with very simple example. Since Spring 3, we can get the JSON result out of the …
Adapter Design Pattern
In this tutorial I am going to explain about the adapter design pattern as part of the design patterns in Java series. Adapter design pattern is one of the structural design pattern because adapter design deals with how we make / structure an object. The primary problem this pattern trying to solve is to make …