Java one line variable declaration? [closed]

The less things that happen on a single line the better. If you choose the second option the code will be easier to debug(you can put a breakpoint on the line where the second initialization happens skipping the first one for instance) and easier to read(IMHO). The only thing that this costs you is a single line. I think it is worth it.

Leave a Comment