Share on Google+Share on Google+

Converting Boolean to String

In this tutorial we are going to convert Boolean to String.

Converting Boolean to String

In this section we will discuss about how to convert boolean to String type. This example show you how to convert boolean type to string type. String class provide valueOf() method which is inside java.lang.String package which convert the value into String type.

public class BooleanToString 
	public static void main(String args[])
		Boolean b=false;
		String str=String.valueOf(b);


In the program, valueOf() method of String class is taking boolean type of data and converting into String type which prints the string value.


Posted on: June 18, 2013 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Share this Tutorial Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Discuss: Converting Boolean to String  

Post your Comment

Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image