Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

javacaps mock 2 Q:30

 
Haining Mu
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Answer: A,C
Why C is correct? In API there is no addActionListener method for TextArea. Anybody explain please. If it can, how ?
 
william shen
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,Haining:
if you check the API of component class,you will find the addActionListener,because the TextField is a subclass of the component right!so the TextField do not override the addActionListener method.This action will response to the enter key!
Hope this will help you!
Originally posted by Haining Mu:
[B]
Answer: A,C
Why C is correct? In API there is no addActionListener method for TextArea. Anybody explain please. If it can, how ?[/B]


------------------
 
Jyotsna Umesh
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Haining Mu:
[B]
Answer: A,C
Why C is correct? In API there is no addActionListener method for TextArea. Anybody explain please. If it can, how ?[/B]

Can somebody please explain why D option is not correct becoz textarea can be scrolled using left and right arrow keys.
Thanx
Jyotsna
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic