Java Byte[] Array To String Conversion

In this tutorial, I am showing how to convert byte[] array to string using java.

Note: Here we are creating a new String new String(bytes, "UTF-8"); with utf-8 encoding, toString() method of String will not return the actual string but return the hash code of that string.

C++ vs Java vs Python a comparison

C++, Java, and Python; these are undoubtedly 3 of the most preferred programming languages in the present times. Pick up any top programming languages list and you’re going to see each of the trio securing their place on it. However, if you’re to choose a winner among the three? Which one will it be? Obviously, this isn’t a question with a concrete answer.

Each one of the triad, C++, Java, and Python, has their own advantages and issues that they call forth with their use. C++ is preferred for its speed and memory management, while Java’s platform independency makes it an opportune option for cross-platform development. Python, on the other hand, is more like a human language with high readability, less complex syntax, and an active community support.

Choosing among C++, Java, and Python depends on the specific requirements that a programming task calls for. Personal preference is yet another parameter that adds value to each of the 3 options. Typically, it is advised to stick to a preferred programming language until one gets adequately adept in the same. Before advancing with the dissimilarities of C++, Java, and Python, let’s first have a brief review of their important aspects:

Getting Mime type in Java

In this tutorial, I am showing how to get mime type of a file in java using Java 7 Files and URLConnection class.

You can select right one from the below listed, which suits your needs.

Java Iterating Over Enum values

In this tutorial, I am showing about enums iteration using different ways like forEach, stream and for loop.

A Java enum is a special data type which helps you to assign set of predefined constants to a variable

Send Email Using Java

In this tutorial, I am showing how to send an email using JavaMail API. Sending email is a required use case for every project.

Here I am using gmail host( and gmail username and password for authentication. For a bigger projects, you have to use paid mail service provider and they will provide the required information like host and port parameters.

Here I am explaining following topics with complete examples

a) Sending plain text Email with JavaMail API

b) Sending HTML email with JavaMail API

c) Sending email attachment with JavaMail API

Read CSV File Using Java Scanner Class

Here I am demonstrating how to read / parse CSV file using java scanner class.

For example my csv file (user.csv) looks like below.


Now I am creating java class for mapping the above fields in csv file.

Create Gantt Chart Using JFreeChart

Create Gantt Chart Using JFreeChart explains about creating a simple gantt chart using JFreechart API

A Gantt chart is a type of bar chart that illustrates a project schedule, named after their inventor, Henry Gantt (1861–1919), who designed such a chart around the years 1910–1915. Modern Gantt charts also show the dependency relationships between activities and current schedule status.

Reference ->

How To Create Gantt Chart Using JFreeChart library?

Create Scatter Chart Using JFreeChart

Create Scatter Chart Using JFreeChart explains about creating a simple scatter chart using JFreechart API

A scatter plot (also called a scatterplot, scatter graph, scatter chart, scattergram, or scatter diagram) is a type of plot or mathematical diagram using Cartesian coordinates to display values for typically two variables for a set of data. If the points are color-coded, one additional variable can be displayed. The data are displayed as a collection of points, each having the value of one variable determining the position on the horizontal axis and the value of the other variable determining the position on the vertical axis.

Reference ->

How To Create Scatter Chart Using JFreeChart library?