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 …
Java
Default Keyword in Java
This tutorial explains how to use default keyword in Java and explains with suitable examples. Default Keyword The following are the scenarios where default keyword can be used in Java : Can optionally be used in switch statement. Can be used to declare default value in Java annotation. From Java 8 on wards ,can be …
Java 9 : Use Process API to Get Process Information
With every one focused on Java 8, let me take you through some of the features in Java 9. As Java 9 is being continuously under development features discussed here might change before the final release of JDK 9. Few links to start with: In this post I am using Java 9 Build b75 downloaded …
Java 8 Date Time API – DateTimeFormatterBuilder Example
Along with lambda expression, virtual methods, streams and many other nice features, Java 8 has also updated a new Date and Time API which is maintained under the JSR-310. One of the greatest on this new API is that all the date and time related APIs are unified under the same package java.time. In my …
Java InvalidPropertiesFormatException Example
When we are using the collection of properties, if the input does not conform to the valid XML document type with the appropriate properties specification at that time an exception is thrown called InvalidPropertiesFormatException, to indicate operation could not be completed. This example explains about that exception. Java InvalidPropertiesFormatException Class Declaration In the above declaration, …
How To Split And Merge Files Using Java
When transferring files through network or uploading to internet, it is common that file size could be the real factor. In those scenarios, splitting the file will solve your problem. The files will be splitted into small parts of chunks, that will be merged into a single file at the destination. This example shows how …
How To Count Files In A Directory Using Java
This example shows how to count the number of files in a folder. File class defines a method list() which returns the array of file names in the directory. By getting the length of that array would mean the number of files in the folder. Lets look at the simple example. CountFilesExample.java
How To Open Word Document In Java
This example shows how to open a word document using Java. If you are working with tools where you have to open the document by clicking on it, you can use the java.awt.Desktop API to easily open the document by passing the file object. Note that this API will open any document passed into the …


