Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6890163
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:14:50+00:00 2026-05-27T06:14:50+00:00

According to this SO question and performance benchmarks Why defining class as final improves

  • 0

According to this SO question and performance benchmarks

  • Why defining class as final improves JVM performance?
  • http://www.javamex.com/tutorials/java_final_performance_vs_non_final_timings.shtml

We can assume that defining classes as public final class is better for performance.

Should we do the same with Android Activities, as they are mostly not used to subclassing ?

public final class LoginActivity extends Activity { ... }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T06:14:50+00:00Added an answer on May 27, 2026 at 6:14 am

    It’s usually a safe bet to make all your classes either abstract or final.

    This way, it’s clear whether a class needs to be designed for inheritance.

    If you later find out that for some reason you need to inherit from a concrete (non-abstract) class – which is usually a sign that there’s a bit of asymmetry in your overall design – you can still remove the final keyword and make sure that your class is fit for inheritance.

    So by doing this you eliminate the waste of having to design all your classes for inheritance, and at the same time you get maintainable code with clear intentions.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

according to this question all HTTP header when we are using HTTPS are encrypted(including
According to this question it seems like you can do this for Methods. What
According to this question I succeeded to create upload image, but now I need
According to the answers to this question, I cannot embed a file version in
According to this http://perldoc.perl.org/UNIVERSAL.html I shouldn't use UNIVERSAL::isa() and should instead use $obj->isa() or
according to this question: Calling template function without <>; type inference the round function
this question is according to this topic: creating a huge dummy file in a
According to this question (and many many google search results), when we're in a
According to this question Raphael - event when mouse near element i create a
According this MSDN article HttpApplication .EndRequest can be used to close or dispose of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.