Ways to create an object of a class

Using constructor: It’s the widely used way of creating objects of a class in most of the programming languages. Based on the need you can overload constructors. See a sample code snippet below. Usage of the above mention code snippet looks like following. Using syntax sugar: Programming languages provide many ways of creating an object…

Read more

Why should we write unit tests?

When I joined my first organization, my seniors asked me to write unit tests for each and every line of code. I was new to the formal IT industry, hence I just followed my seniors. No one explained any reasoning to me. I kept asking this question to my self, why should we write unit…

Read more