SyntaxFix
Write A Post
Hire A Developer
Questions
That's where constructors come into play. If you have a default constructor (eg. with no parameters) that always creates a new Map, then you're sure that every instance of this class will always have an already instantiated Map.