Exception hierarchy

We know that, In java, Exception can be either checked or unchecked and same has been shown in the below exception hierarchy Parent class of all exceptions in java is “Throwable” class. Any instance of Throwable class can be caught using catch block except Error. We can’t handle errors in Java through program. Exception hierarchy […]

Share this article on

isEmpty, startswith and endsWith

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 1 public boolean isEmpty() public boolean isEmpty() Example 1 2 3 4 5 6 7 8 public class StringEmptyExample{   public static […]

Share this article on
< Previous