1.what is inheritance?

-inheritance is one of the oops concepts in java.inheritance is concept of getting properties of one class object to another class object.
-Inheritance represents the IS-A relationship,also known as parent-child relationship.

2.what are the types of inheritance?

1.Multiple inheritance( java doesn’t support multiple inheritance).
2.Multilevel inheritance.

Continue Reading →

I wanted to cover 10 of the things I’ve learned over the years being a professional programmer that really helped me improve the quality of my code and my overall productivity.

1. Never ever duplicate code

Avoid duplicating code at all costs. If you have a common code segment used in a few different places, refactor it out into its own function. Code duplication causes confusion among your colleagues reading your code, it causes bugs down the line when the duplicated segment is fixed in one location and not the others and it bloats the size of your code-base and executable. With modern languages its become possible to get really good at this, for example here is a pattern that used to be hard to solve before delegates and lambdas came along:

Continue Reading →