Is string length larger than expected - Android java.lang

Android examples for java.lang:String Null or Empty

Description

Is string length larger than expected

Demo Code

import android.annotation.SuppressLint;
import java.text.SimpleDateFormat;
import java.util.Date;

public class Main{

    public static boolean larger(String source, int length) {
        return (source != null && source.length() > length);
    }/*w  w w.j  av a2  s. c om*/

}

Related Tutorials