Java
-
what is the advantage of declaring each variable in separate line?
Zaki
-
what is the advantage of declaring each variable in separate line?
Zaki
-
what is the advantage of declaring each variable in separate line?
Zaki
What is the advantage of posting the same message over and over again?! :mad: Java1 - Java Discussion Boards[^] - 6th October - "what is the advantage of declaring each variable in separate line?" Java1 - Java Discussion Boards[^] - 22nd December - "what is the advantage of declaring each variable in separate line?" Java - Java Discussion Boards[^] - 22nd December - "what is the advantage of declaring each variable in separate line?" You were given the answer back in October. It hasn't changed in the last two months.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
-
What is the advantage of posting the same message over and over again?! :mad: Java1 - Java Discussion Boards[^] - 6th October - "what is the advantage of declaring each variable in separate line?" Java1 - Java Discussion Boards[^] - 22nd December - "what is the advantage of declaring each variable in separate line?" Java - Java Discussion Boards[^] - 22nd December - "what is the advantage of declaring each variable in separate line?" You were given the answer back in October. It hasn't changed in the last two months.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
-
what is the advantage of declaring each variable in separate line?
Zaki
It is one of those good practices which you're asked to follow while writing your code because it makes a lot cleaner and concise code. This is similar as to why we programmers focus so much on indentation... Because whenever you're working on a big project chances are you may not be the only person working on it, so if someone else has to review your code it'll be a lot easier for him/her to get a reference as to where was each variable declared. Because you might be well aware of the haunting NullPointerException which just pops out of no where and can be really trick to negotiate if your code isn't clear. Hope this helps. Cheers.