Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    /**
     * A method to check whether a string is null or empty.
     *
     * @param String .
     * @return boolean true or false.
     */
    public static boolean isNullOrEmpty(String s) {
        return s == null ? true : (s.trim().length() <= 0);
    }
}