Constructor (object-oriented programming): Difference between revisions

Content deleted Content added
Example: Confused example fixed?
Line 8:
//declaration of instance [[variable (computer science)|variable]](s).
protected int data;
protected int data2;
//definition of the '''constructor'''.
Line 19 ⟶ 18:
public Example(int input)
{
data2data = input;
}
}