Note that there are some explanatory texts on larger screens.

plurals
  1. POHow does "final" play a role in security?
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. CO@user93353 - Here's [a link from Oracle](http://www.oracle.com/technetwork/java/seccodeguide-139067.html) that says the following about security and the _final_ keyword: "_It is better to design APIs with security in mind. Trying to retrofit security into an existing API is more difficult and error prone. For example, making a class final prevents a malicious subclass from adding finalizers, cloning, and overriding random methods (Guideline 4-5)._" (It took about 2 seconds to find)
      singulars
    2. CO@user93353 - Here's another quote from the same [link](http://www.oracle.com/technetwork/java/seccodeguide-139067.html): "_Design classes and methods for inheritance or declare them final [6]. Left non-final, a class or method can be maliciously overridden by an attacker. A class that does not permit subclassing is easier to implement and verify that it is secure. Prefer composition to inheritance._" If you read that document there are dozens of code examples that make use of the _final_ keyword... and they're not using it because it's fun.
      singulars
    3. COYour duplicate question have attracted a large number of bad answer and comments. People are simply believing in everything they've read somewhere in internet. The original question has a reasonable answer: http://stackoverflow.com/a/2111887/531954
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload