class Widget {
staticprivateint widgetCount = 0;
public String wName;
int wNumber;
privatestaticint addWidget() {
return ++widgetCount;
}
public Widget() {
wNumber = addWidget();
}
}
A. Each Widget gets a unique wNumber that reflects the order in which the Widgets were created.
B. Each Widget gets a wNumber, but you cannot guarantee that the number will be unique.