nullpointer extension 1

nullpointer extension

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;
}

Here is what the above code is Doing:
1. It’s creating a class C that has three private fields: b, d, and e.
2. It’s creating a constructor that takes three parameters: b, e, and d.
3. It’s assigning the values of the parameters to the private fields.

Similar Posts