Please note that: I have read some where that when we define the class level variables: List or Map. They should be always initialize with new operator: example -- private List students = new ArrayList(); But the architect is against it and telling me that it will consume 10 buckets on initializing variable on class level. But, I am very much against it: to check student list as null, before using it.
Please advice me best practice; should I initialize array list on class level or not.
Please advice. If you have any better reference URL or book name for java coding practice please provide me.
Listalways accessed, or very rarely? The default answer is to make the code as simple as possible and initialize with the declaration until you have clear evidence that it's presenting a problem for memory or performance.