java - What is best way to declaration a variable ? follow below example? -


example:

string one="one", two="two", three="three"; 

(or)

string one="one"; string two="two"; string three="three"; 

see, above e.g 1 best way in real time? difference both us? using 1st 1 save class file memory. programmer use 2nd one.why there use 2nd did not understand?tell me one

programming maintainability. code wrote should able modified developer coming in 100 years after you.

maintainability rely heavily in code readability. second 1 more readable first one.

and further more second 1 more flexible. in sense if want change datatype of two in second method easier first method.


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -