'Final' prevents extension, 'sealed' restricts it.
The 'final' keyword in Java prevents any class from extending the marked class, while 'sealed' allows extension but only from specific subclasses. This distinction is crucial for scenarios where you want to maintain flexibility in your class design, like allowing only certain types of users to extend a `User` class in an application.