Convert a Boolean to a String

Convert a Boolean to a String

Implement a function which convert the given boolean value into its string representation.

Note: Only valid inputs will be given.

Solution

public class BooleanToString {
  public static String convert(boolean b) {
    return Boolean.toString(b);
  }
}
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments