int evtct =0;
AWTEvent lastE;
public void SaveEvent(AWTEvent evt)
{
lastE=evt;
evtct++;
}
Which of the following will make calls of SaveEvent would run without causing an exception
1)call with an AWTEvent objectreference
2) call with an ActionEvent object reference
3) call with an Event object reference
4) call with null value
1) obviusly is right.
2) Is right because ActionEvent inherit from AWTEvent.
3) Is wrong because Event doesn�t belong to the same hierachy, it�s from the old event model (
Java 1.0 event model).
4) Is right because you can initialize an object with a null value