isEmpty, startswith and endsWith
- 11th Jan 2018
- 0
- 6728
- endswith() methods in java isempty() methods in java startswith() method in java usage of isempty() startswith() and endswith() method in java
isEmpty This method is used to check whether string has any characters in it or its empty string. It returns true if length of a string is zero and false otherwise. Method signature public boolean isEmpty() public boolean isEmpty() Example public class StringEmptyExample{ public static void main(String args[]){ String s1=""; String s2="java"; […]