Quantcast
Channel: User Filip Milovanović - Software Engineering Stack Exchange
Viewing all articles
Browse latest Browse all 182

Comment by Filip Milovanović on Naming factory methods

$
0
0
@SergeyZolotarev - JonasH is not suggesting that you use a field, it just seems that way due to his C# background. There, Instance is typically a "property"; these look like fields at the call site, but are actually syntactic sugar for a getter or a setter, and so can contain logic. In Java you'd use a method named getInstance().

Viewing all articles
Browse latest Browse all 182

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>