Assert Object is Not Null - Java java.lang

Java examples for java.lang:Assert

Description

Assert Object is Not Null

Demo Code


//package com.java2s;

public class Main {
    public static void main(String[] argv) throws Exception {
        Object object = "java2s.com";
        System.out.println(isNotNull(object));
    }//  ww  w . j av  a  2 s. c  o  m

    public static boolean isNotNull(Object object) {
        return object != null;
    }
}

Related Tutorials