Hi Again,
This one is confusing..it is from IBM mock
test...
can anyone help ?
Based on the code below assume A1 & A2 implement ActionListener interface.
TextField tf = new TextField("This is a test");
ActionListener ac1 = new A1();
ActionListener ac2 = new A2();
tf.addActionListener(ac1);
tf.addActionListener(ac2);
a. The enableEvents() method must be registered to the TextField()
b. This code compiles & runs successfully.
c. Lines 2 & 3 generate errors when compiled.
d. This code will not run without error.
Thx in Advance
Aruna