The char data type stores a single 16-bit Unicode character, and String, also stores a sequence of characters. Moreover, you may need to carry out operations on individual char values by converting them to the String object for functions like concatenation, manipulation, or presentation.
Java has many ways to achieve these types of changes; each method is better fitting for specific situations and needs of your program.

Let's explore some common techniques:
The String.valueOf() method converts non-string data types, including the char, to their string representation. It provides a direct way of transforming a char to a String, which fits the majority of the cases.
Let's see the simple example of converting char to String.
Output:
Converted From char to String is: a
Character.ToString() is highly optimized for converting a char to a String but still ensures that the code is as readable as possible. Directly in it converts the char to a String object without hidden supply.
Let's see the simple code to convert char to String.
Output:
Converted from Char to String is: M
The String.copyValueOf() method is used to produce a new String which has the specified UTF-16 character sequence. It provides a different way of converting character into string mostly on array initialization.
Let's see the simple code to convert char to String.
Output:
Converted from Char to String is: Hello
This technique utilizes appended character concatenation to an empty string, casting it to a String. The simplicity is not immune to the possibility of being less efficient than some other methods, due to unnecessary string concatenation process.
Let's see the simple code to convert char to String.
Output:
Converted from Char to String is: a
The technique involves the String class constructor that takes into account a char array. From the straightforward point of view, it involves new array object creation which may be causing the performance issue in Java for the single letter conversions.
Let's see the simple code to convert char to String.
CharToStringExample.java
Output:
Converted from Char to String is: a
StringBuilder or StringBuffer class allows a String to be built from chars smoothly, and this is important in situations where dynamic string construction is involved. These classes have mutability features and become better while concatenating several characters.
Let's see the simple code to convert char to String.
CharToStringExample.java
Output:
Converted from Char to String is: a
We request you to subscribe our newsletter for upcoming updates.

We deliver comprehensive tutorials, interview question-answers, MCQs, study materials on leading programming languages and web technologies like Data Science, MEAN/MERN full stack development, Python, Java, C++, C, HTML, React, Angular, PHP and much more to support your learning and career growth.
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India