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
Post a Comment