Ad
  • Custom User Avatar

    Technically there is no difference. The compiler will change this version to a "return" statement.
    So it is just syntactic sugar and personal preference.
    I personally like to use the lambda style if my method does not have much logic like in this case. This reduces your code to the important statement without the noise of the brackets, etc.