• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Another not-sure qstn from Jammi..

 
Ranch Hand
Posts: 1467
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The foll. qstn is asked in both Jaworski and Chris Mock Exam applets. But they both give different answers. In Chris Exam, ans 2) is given false. He says adapter classes give no-implementation. They don't give default-implementation.
But in Jammi ans 2) is said to be true. We know that All adapter classes define empty methods. What you all think is the appropriate ans. for the exam ?
Thank you.
regds
maha anna
Which of the foll. statements are true ?
1. Event listeners are interfaces that define methods that
event-handling classes must implement.
2. An event adapter is a class that provides a default implementation of an event listener
3. EventListeners and Adapter classes are deprecated in Java 2 Event Handling
4. The WindowAdapter class is used to handle window-related events

[This message has been edited by maha anna (edited April 05, 2000).]
 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by maha anna:
The foll. qstn is asked in both Jaworski and Chris Mock Exam applets. But they both give different answers. In Chris Exam, ans 2) is given false. He says adapter classes give no-implementation. They don't give default-implementation.
But in Jammi ans 2) is said to be true. We know that All adapter classes define empty methods. What you all think is the appropriate ans. for the exam ?
Thank you.
regds
maha anna
[b]Which of the foll. statements are true ?

1. Event listeners are interfaces that define methods that
event-handling classes must implement.
2. An event adapter is a class that provides a default implementation of an event listener
3. EventListeners and Adapter classes are deprecated in Java 2 Event Handling
4. The WindowAdapter class is used to handle window-related events

[This message has been edited by maha anna (edited April 05, 2000).][/B]


Maha,
I am a new visitor to this site. I found this site yesterday and found very useful for the Java 2 Certification preparation.
My answer to the above question: Option 2 is false. Because Adapter classes do not provide default implementation, instead they provide empty body. I mean, when you say default implementation they should do something. Hope this helps.
Regards,
Kondal.
 
Wanderer
Posts: 18671
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
From a Java point of view, an interface is "implemented" if all its methods are given definitions and are not abstract. If the definition of the method is basically "do nothing" (empty braces), Java doesn't care - the interface has still been implemented by the class. Logically then whatever it does is an "implementation". If the question was to test whether people know that the adapter methods don't do anything, it should be re-phrased, in my opinion.
 
Rancher
Posts: 241
Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If this isn't implementation, then I would like to know, what is implementation? Is there a certain amount of code that qualifies, or something it has to do? For that reason I would say this is true, maybe I'm wrong.
Eric
 
This tiny ad is wafer thin:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic