Mega Code Archive

 
Categories / Java / Data Type
 

Convert Boolean to String

public class Main {                  public static void main(String[] args) {         boolean theValue = true;                  //boolean to String conversion         String theValueAsString = new Boolean(theValue).toString();                  System.out.println(theValueAsString);     } } //true