Use the following problems to test your object, immutability, and switch expression programming prowess. I strongly encourage you to give each problem a try before you turn to the solutions and download the example programs:
- Checking null references in functional style and imperative code: Write a program that performs the null checks on the given references in a functional style and imperative code.
- Checking null references and throwing a customized NullPointerException error: Write a program that performs the null checks on the given references and throws NullPointerException with custom messages.
- Checking null references and throwing the specified exception (example, IllegalArgumentException): Write a program that performs the null checks on the given references and throws the specified exception.
- Checking null references and returning non-null default references...