Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    public static final boolean convertValueToBoolean(CharSequence value, boolean defaultValue) {
        boolean result = false;

        if (null == value) {
            return defaultValue;
        }

        if (value.equals("1") || value.equals("true") || value.equals("TRUE")) {
            result = true;
        }

        return result;
    }
}