首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

判断字符串是不是为空

2012-10-08 
判断字符串是否为空/**? * Checks if an string is empty.? */public static boolean isEmpty(String str)

判断字符串是否为空

/**
? * Checks if an string is empty.
? */

public static boolean isEmpty(String str) {
??return (str == null) || (str.trim().length() == 0);
?}

热点排行