Java Boolean to String convertBooleanToString(boolean flag)

Here you can find the source of convertBooleanToString(boolean flag)

Description

convert Boolean To String

License

Open Source License

Parameter

Parameter Description
flag a parameter

Declaration

public static String convertBooleanToString(boolean flag) 

Method Source Code

//package com.java2s;

public class Main {
    /**/*from   w  w  w  . j a  v a2s  .  co m*/
     * @param flag
     * @return
     */
    public static String convertBooleanToString(boolean flag) {
        return !flag ? "1" : "0";
    }
}

Related

  1. booleanToString_1(String str)
  2. boolToStr(Boolean value)
  3. boolToString(boolean x)
  4. boolToString(final boolean b)
  5. BoolToStringEx(Boolean bValue)
  6. convertBooleanToString(Integer booleanValue)