Online Training Spring Hibernate Training in Delhi R Programming Training Course Big Data and Hadoop Training Java Training

Converting Boolean to String

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

Ads

Tutorials   
Ads

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);
		System.out.println(str);
		
		}

    }

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

Advertisements

Online Training Classes

Share on Google+Share on Google+

Converting Boolean to String

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

Advertisements

 

Discuss: Converting Boolean to String  

Post your Comment


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

Ads

 

Ads