Question d’entretien chez O'Reilly Auto Parts

What's the difference between final and finally?

Réponse à la question d'entretien

Utilisateur anonyme

23 févr. 2019

The final keyword is a modifier on a variable to say that it may not be reassigned a value, a method to say it may not be overridden, or a class to say it may not be extended. The finally keyword is used after a try/catch block to indicate that a block of code should be executed regardless of whether an exception is thrown or not.