Red Chapter 3 answers

Chapter 3 exercises/answers.
Use of these methods would be better for production code, but for the sake of the question, it feels like it'd be delegating the solution to the Java libraries.

The second line is indeed needlessly executed when the first one has already converted it, but for the sake of brevity I wanted to leave this as ternary statements rather than an `if-else-if