1.

Which of these methods can be used to know which key is pressed?(a) getKey()(b) getModifier()(c) getActionKey()(d) getActionEvent()I have been asked this question in an interview for job.My query is from ActionEvent & AdjustmentEvent Class in division Event Handling of Java

Answer»

The CORRECT choice is (b) getModifier()

The best I can explain: The getModifiers() methods returns a value that INDICATES which modifiers keys (ALT, CTRL, META, SHIFT) were pressed when the EVENT was generated.



Discussion

No Comment Found

Related InterviewSolutions