In Java How to Create .jar / .tar.gz / .zip Archive file using...
Maven is pretty amazing. With so many plugins it is one of the Best Java Build tool in the market right now. I use it in all of my projects and heavily depends on it. Build possibilities are endless....
View ArticleHave you Noticed java.lang.NullPointerException (NPE)? 8 Best Practices to...
Avoid Null Pointer Exception in Java and Java Tips and Best practices to avoid NullPointerException in Java. As a Java Developer, I’m sure you must have faced Null Pointer Exception (NPE) starting 1st...
View ArticleHow to Implement Simple CircularArrayList in Java?
In this tutorial we will go over details on how to implement Circular ArrayList. There are numerous examples we have on Crunchify about ArrayList and this one will be with Integer Array. Let’s get...
View ArticleIn Java How to Save and Load Data from a File – Simple Production Ready...
How do I write an object to a file and read it back? Java is pretty amazing with lots of API and with Java 8 we are fully enabled with lots more APIs like Lambda, Method reference, Default methods,...
View Article‘Maven(mvn) Clean Install’, ‘Update Project’ and ‘Project Clean’ Options in...
Apache Maven is a Software Project Management tool. Based on the concept of a Project Object Model (POM), Maven can manage a project’s build, reporting and documentation from a central piece of...
View ArticleHow to Remove unused CSS from WordPress style.css file – Blog Performance...
Page speed and Site performance are the key factors to get success in online world. With the Google’s AMP effort, Caching tactics, Content Delivery Network (CDN), .htaccess tricks and some more are...
View ArticleHow to Use ResourceBundle.getBundle to get Properties Value at Runtime in Java?
Backing a ResourceBundle with Properties Files Tips. Java is very dynamic programing language. With thousands of APIs available for us to use, we do have a freedom of choice. Some time back I’ve...
View ArticleHow to Report / Print List of All Loaded Spring Beans during your Spring MVC...
Are you working on Enterprise level Spring MVC project? Is it with more than hundreds of classes and packages? Are you really struggling on how to get list of all loaded Spring MVC beans information?...
View ArticleJava ConcurrentNavigableMap and ConcurrentSkipListMap Tutorial with all...
Sometime back I’ve written an article on difference between HashMap, ConcurentHashMap and SynchronizedMap. In this tutorial we will go over ConcurrentNavigableMap and ConcurrentSkipListMap with all...
View ArticleBeginners Guide to Java Interface? How to use it? Java Tutorial Example Attached
I believe this is the 1st question you might expect in Java Interview. Very basic questions but widely used in interview :). There is no perfect answer for this and there are number of ways to answer...
View ArticleIn Java What is a Difference Between IdentityHashMap and HashMap +...
Sometime back I have a special case in which I have to compare Map’s Key based on equality operator (==). The equality operator (==) compares the references (addresses in memory) of the two Keys as...
View ArticleIn Java How to Perform File Search Operation using java.nio.file interface?...
Java 8 has so many new functionalities and collection of features which are hidden inside packages. In this tutorial we will go over java.nio.file.Path interface. Path is an object that may be used to...
View ArticleHow to get MD5 checksum for any given file in Java? Use commons-codec’s...
Tighten the security of your enterprise application is the biggest challenge of any organization. Consider this actual production scenario: You have an application which reads the value from a file...
View ArticleHow to Implement Selection Sort Algorithm in Java – Detailed Explanation
Are you a Computer Science Graduate? Are you preparing for an Interview? Want to become a master in Data Structure? Well, Sorting algorithms are the most frequently asked questions in Java interview...
View ArticleHow to Show Hidden Features in WordPress Visual Editor? Font Family, Sizes,...
Today morning which I was writing an article on Selection Sort algorithm in Java, I wanted to show time complexity for that program. Usually complexity would be O(n2). I tried searching for some time...
View ArticleHow to Create a Simple In Memory Cache in Java (Lightweight Cache)
High performance scalable web applications often use a distributed in-memory data cache in front of or in place of robust persistent storage for some tasks. In Java Applications it is very common to...
View ArticleUse “maven-shade-plugin” to Create just 1 Executable jar with all required...
Just create one Crunchify.jar file with all dependencies inside it Last week I wrote a tutorial on how to use maven-resources-plugin, maven-dependency-plugin & maven-jar-plugin to generate your...
View ArticleHow to Build Java Project including all Dependencies Using Maven?...
Are you working on enterprise level Java Project? Using Maven POM.xml file to keep all dependancies up-to date? In your project do you have src folder, resources folder, lib folder, etc? Well, what if...
View ArticleIn Java How to Sort a Map on the Values? The Map Interface – Java Collections
In Java How to sort a Map on Value? There are number of ways. Here we will follow below steps.public interface Map<K,V>An object that maps keys to values. A map cannot contain duplicate keys;...
View ArticleHow-To: Java Regex – Matcher Pattern (java.util.regex.Matcher) Complete Tutorial
In this tutorial we will go over list of Matcher (java.util.regex.Matcher) APIs. Sometime back I’ve written a tutorial on Java Regex which covers wide variety of samples. Regular Expression is a...
View Article