Chose composition over inheritance, is one.
Many people, especially those new to OO will start extending classes when all they really need to is to use composition. Really if you should ask your self, is the new class B a Class A? If not then you shouldn't extend.
For example, let's say I have a Person
Class, a Car
Class, and I would like to make a new class called a DrivenCar
class. A naive implementation would be to say (let's pretend we got multiple inheritance)
class DrivenCar extends Person, Car { ... }
Is the DrivenCar a type of Person? No so it shouldn't be extending Person. Is the DrivenCar a Car? yes so it makes sense to extend
Using composition the implmentation would look like
class DrivenCar extends Car {
private Person driver;
}