Java Properties File – How to Read and Write

In this tutorial you will learn about java properties file and how to perform read and write operations on it.   What is properties file? In Java related technologies, properties file is used to store configuration data or settings of application. It has .properties extension.   Why we need properties file? It makes application maintenance easier. We can change some information in application by doing changes in properties file. We don’t need to recompile the java source files. Let us

Read more

Solve javac is not recognized as an internal or external command Error

The error javac is not recognized as an internal or external command arises when we try to compile any java source file using javac command. The reason for this error is because the path of javac command is not set properly. This error can be solved easily by setting javac compiler path in environment variables. How to solve javac is not recognized as an internal or external command Error? This can be done in two ways as given below.  

Read more

How to Sort ArrayList of Objects in Java

In this tutorial you will learn how to sort arraylist of objects in java. In our previous tutorial we have seen how to sort arraylist of String or Integer type using Collection.sort() method. Can we use that process to sort an arraylist of custom objects? The answer is big no. For doing this we have to use Comparable or Comparator interfaces. Below I have shared an example for each of them. Sort ArrayList of Objects Using Comparable Comparable is used to

Read more

How to Sort ArrayList of String and Integer in Java

In this tutorial you will learn how to sort ArrayList of String or Integer in Java. We can easily sort an arraylist in ascending or descending order using Collections.sort() method. Below I have shared simple example for each of them. Sort ArratList in Java Example to Sort ArrayList of String Below program sorts an arraylist of String type.

  Output Sort in ascending order Android IOS Linux Mac Windows Sort in descending order Windows Mac Linux IOS Android  

Read more

Convert Image to Base64 String or Base64 String to Image in Java

In this tutorial you will learn how to convert or encode image to Base64 string and convert or decode Base64 string to image in Java.   What is Base64? Base64 is a group of similar binary-to-text encoding schemes that represent binary data in an ASCII string format by translating it into a radix-64 representation.     Why we need to convert image to Base64 string? Let’s consider some real life scenarios. What we will do if we want to store

Read more
1 7 8 9