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);
    }
}

Output:


true
Home 
  Java Book 
    Runnable examples  

Data Type Boolean:
  1. Create Boolean from boolean value
  2. Convert Boolean to boolean value
  3. Convert Boolean to String