String.isEmpty


String.isEmpty

isEmpty public boolean isEmpty() Returns true if, and only if, length() is 0. Returns: true if length() is 0, otherwise false Since: 1.6 길이가 0이면 true값, 나머지는 false값 반환. public boolean isEmpty() { return value.length == 0; } 예문) String hello = null; System.out.printf("hello=(%s)\n", hello); System.out.println("hello == null : " + (hello == null)); System.out.println("hello != null : " + (hello != null)); String hello2 = hello; System.out.println("$ hello == hello2 : " + (hello == hello2)); if(hell...



원문링크 : String.isEmpty