design - Is it better to assign variables in a class itself or in the class' constructor? -
It's a type of design, and I'm sure there are people who do it in both ways. But in your opinion, is it better to specify a variable in the class or the constructor? For example (regardless of syntax or language, this is just to explain):
public class examples {private finals full TIME_STAMP = now (); Private intake number = 2; }
OR Please ignore the mix of different languages and syntax ... which is better and why?
Comments
Post a Comment