Please help me how does the string.equals in java work with null value? Is there some problem with exceptions? Three cases:
boolean result1,result2, result3;
Use Objects.equals() to compare strings, or any other objects if you're using JDK 7 or later. It will handle nulls without throwing exceptions. See more here: how-do-i-compare-strings-in-java
Objects.equals()