Skip to main content
added 229 characters in body
Source Link
Thomas
  • 1.2k
  • 1
  • 10
  • 9

Abstract classes may feature abstract protected methods (in the languages I'm working with), in interfaces methods are usually always public. Whether this difference allows useful exploitations I don't know.

Edit I first thought that a private abstract method is of no use, but now I recalled that it may be used to ensure that that method is never called. This way you can prevent that a copy constructor of an object is called.

Abstract classes may feature abstract protected methods (in the languages I'm working with), in interfaces methods are usually always public. Whether this difference allows useful exploitations I don't know.

Abstract classes may feature abstract protected methods (in the languages I'm working with), in interfaces methods are usually always public. Whether this difference allows useful exploitations I don't know.

Edit I first thought that a private abstract method is of no use, but now I recalled that it may be used to ensure that that method is never called. This way you can prevent that a copy constructor of an object is called.

Source Link
Thomas
  • 1.2k
  • 1
  • 10
  • 9

Abstract classes may feature abstract protected methods (in the languages I'm working with), in interfaces methods are usually always public. Whether this difference allows useful exploitations I don't know.