This is why Java 8 introduced Optionals. It's not syntactic sugar so it's more verbose than the Kotlin example, but it does the same thing:
String manager = Optional.ofNullable(employee)
Oh nice! I clearly haven't used Java in a while; I do still think the elvis operator looks a bit cleaner though.
Oh man... now I cannot unsee Elvis in the "Elvis operator" :-D
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.