Why is it bad practice to declare variables on one line?
e.g.
private String var1, var2, var3
instead of:
private String var1; private String var2; private String var3;
In my opinion, the main goal of having each variable on a separate line would be to facilitate the job of Version Control tools.
If several variables are on the same line you risk having conflicts for unrelated modifications by different developers.
2.1m questions
2.1m answers
60 comments
57.0k users