in Education by
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 Select the correct answer from above options JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
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.

Related questions

0 votes
0 votes
    Which property is used to specify the key type when pressed? (a) keyCode (b) keyType (c) keyName ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 23, 2021 in Education by JackTerrance
0 votes
    Which of these methods can be used to output a string in an applet? (a) display() (b) print() ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    Which of these methods can be used to determine the type of event? (a) getID() (b) getSource() ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
0 votes
    Which of these methods can be used to get reference to a component that was removed from a container? ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
0 votes
0 votes
    Which of these events is generated when a button is pressed? (a) ActionEvent (b) KeyEvent (c) ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    Which of these methods is used to print stack trace? (a) obtainStackTrace() (b) printStackTrace() (c ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    Which of these class contains the methods used to write in a file? (a) FileStream (b) FileInputStream ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
...