Here you can find the source of length(String str)
Parameter | Description |
---|---|
str | a parameter |
public static int length(String str)
//package com.java2s; //License from project: Open Source License public class Main { /**/* w ww.java 2s .c om*/ * returns the length of the given string. * 0 if str is null * @param str * @return */ public static int length(String str) { return str == null ? 0 : str.length(); } }