- public class IsEmpty {
- public static void main(String args[]){
- String str1 = "";
- String str2 = null;
- String str3 = "ForgetCode";
- System.out.println("Is String 1 empty? :" + str1.isEmpty());
- System.out.println("Is String 3 empty? :" + str3.isEmpty());
- }
- }