Privacy Policy Terms Of Use. Copyright © 2006-2010 Java Tutorials and Examples.
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
- /*
- * Convert Boolean to String example. Program to convert Java
- * Boolean object to String object.
- */
- public class BooleanToString {
- public static void main(String args[]){
- //new Boolean object
- Boolean bObj = new Boolean("true");
- //to convert Boolean to String use toString method of Boolean wrapper class
- String strBValue = bObj.toString();
- System.out.println("Boolean converted to String: " + strBValue);
- }
- }

Post new comment