Category Java

How to Convert Int to Long in Java

In this tutorial, we will learn how to convert int numeric value to long value, int value to Long wrapper object and vice versa in Java easily. To convert int to long numeric value in Java, we use an assignment…

How to Convert Boolean to String in Java

How to convert boolean to string in Java

In this tutorial, we will learn how to convert a primitive data type boolean to a non primitive data type string in Java easily. Sometimes, we need to convert values from one data type to another, under certain situation. Therefore,…

How to Convert String to Boolean in Java

How to convert string to boolean in Java

In this tutorial, we will learn how to convert string to primitive type boolean or Boolean wrapper class object in Java easily. There are three ways to convert a string to a boolean data type. They are as follows: Convert…

How to Convert Char to String in Java

How to convert char to String in Java

In this tutorial, we will learn how to convert a primitive data type char to a non primitive data type string in Java easily. Sometimes, we need to convert values from one data type to another, under certain situation. Therefore,…

How to Convert String to Char in Java

How to convert string to char in Java

In this tutorial, we will learn how to convert string to char data type in Java easily. There are mainly two ways for converting a string into char data type in Java. They are as: Convert using charAt() method Convert…