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 8933895
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T09:39:13+00:00 2026-06-15T09:39:13+00:00

I wont try to extends a Pattern because we can’t (I will wrap), but

  • 0

I wont try to extends a Pattern because we can’t (I will wrap), but I would like to know why Pattern class is final ?

I mean this class could be extended for a largest use but they did the choice to make it final. Why ?

If i ask it, it is more in a technical (curious ?) way than in a “java is so bad” way.

  • 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-06-15T09:39:15+00:00Added an answer on June 15, 2026 at 9:39 am

    It’s final specifically to prevent you from extending it, because it is not designed to be subclassed. Pattern instances are immutable and thread-safe, neither of which would be guaranteed if you created your own subclass of Pattern.

    • Why is the java.util.Scanner class declared 'final'?
    • Why is String class declared final in Java?
    • And of course, the all-important Effective Java quote:

      Item 17: Design and document for inheritance or else prohibit it

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

Sidebar

Related Questions

I have a BroadcastReceiver that can successfully catch a broadcast, but if I try
I don't know if this is possible so i will try to explain as
http://www.dorsetdesigns.co.uk/contact.html try the form it wont send a email to me. i am using
First off tags wont work. I say this because i create 4 buttons all
(the example code below is self-contained and runnable, you can try it, it won't
I used following code in java class of android. Everything works except it wont
public class DisplayImage extends Panel { BufferedImage bImg; static int i = 0; public
I need to check whether a certain class extends or implements a particular interface.
I have code for ListwithImage list. But when i try to onclickItem shows with
I'm writing a 2D Vector class whose declaration looks like: case class Vec2(x:Float, y:Float)

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.