StringUtilsTrial.java Source code

Java tutorial

Introduction

Here is the source code for StringUtilsTrial.java

Source

/*
14) Check that ABCD contains none of !@#$%^&* >>>true
    
 */

import org.apache.commons.lang.StringUtils;

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

        // Check that a string does not contain any of these characters !@#$%^&*
        System.out.println(
                "14) Check that ABCD contains none of !@#$%^&* >>>" + StringUtils.containsNone("ABCD", "!@#$%^&*"));
    }
}