Java tutorial
//package com.java2s; public class Main { private static boolean isInvalid(String str) { return str == null || str.trim().equals("") || str.trim().length() < 5; } }