Difference between Hooks and Abstract Methods in Java

This is a quoted question from the study materials from my university.

It makes totally no sense to me.

For me hooks are specified points in (mostly sequential but not only) programs, where you can specify your own methods or callbacks to be executed.

For example an application has an "on before shutdown hook", i can register my callback method there that saves the user data to disk before shutdown.

Abstract methods are self explaining.

To me this is something completely different? or does either of those things have a 2nd meaning I don't know of? I did a quick search but didn't find anything.

13
задан shamittomar 25 January 2011 в 18:38
поделиться