Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.util.ArrayList;

public class Main {
    public static boolean isNotNullAndNotEmpty(Object o) {
        return o != null;
    }

    public static boolean isNotNullAndNotEmpty(String s) {
        return s != null || !s.isEmpty();
    }

    public static boolean isNotNullAndNotEmpty(ArrayList list) {
        return list != null || !list.isEmpty();
    }

    public static boolean isNotNullAndNotEmpty(Object[] array) {
        return array != null || array.length > 0;
    }
}