StringUtilsTrial.java Source code

Java tutorial

Introduction

Here is the source code for StringUtilsTrial.java

Source

/*
10) Trim String. No NullPointerException >>>null
    
 */

import org.apache.commons.lang.StringUtils;

public class StringUtilsTrial {
    public static void main(String[] args) {

        // No NullPointer Exception even if null!
        System.out.println("10) Trim String. No NullPointerException >>>" + StringUtils.trim(null));

    }
}