Here you can find the source of toBoolean(char c)
Parameter | Description |
---|---|
c | a parameter |
public static Boolean toBoolean(char c)
//package com.java2s; //License from project: Apache License public class Main { /**/*from w w w. j a v a 2 s.co m*/ * convert 'y', or 'n' to boolean * @param c * @return */ public static Boolean toBoolean(char c) { switch (c) { case 'y': return true; case 'n': return false; default: return null; } } }