Convert float from primitive type to object type in java.
Convert boolean to string java.
In this example, you will see how two convert a boolean
value into string in java.
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".
BooleanToString.java
package com.devmanuals; public class BooleanToString { public static void main(String[] arg) { Boolean boolObject = new Boolean(true); String str = boolObject.toString(); System.out.println("String value of boolean object : " + str); } }Output:
String value of boolean object : true |
[ 0 ] Comments