Tag: orElse

  • The best way to use Optional in Java

    Null pointer exceptions. They have often been a headache to java developers. Your application breaks out of nowhere and throws null pointer exceptions. You rub your forehead then and add that null check you missed out. Java wanted to solve this problem. And they introduced the Optional keyword. They described it as a “Container” that…