In this section, we are going to convert a Boolean type data into a string.
Code Description:
This program helps you in converting the Boolean type data into a string. The toString() method reads the Boolean type object and it converts into a string format. This method returns a string object and represents the boolean?s value. The Boolean object represents either ?true? or ?false".
Here is the code of this program:
import java.util.*;
|
Output this program.
| C:\corejava>java BooleanToString String is:true C:\corejava> |
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.
Ask Questions? Discuss: Convert Boolean to String
Post your Comment