Check out example codes for "nullpointer extension". It will help you in understanding the concepts better.

Code Example 1

public class C {
private B b = null;
private D d = null;
private E e = null;

public C(B b, E e, D d)
{
    this.b = b;
    this.e = e;
    this.d = d;
}

Learn ReactJs, React Native from akashmittal.com