To prevent inheritance, use the keyword “final” when creating the class . The designers of the String class realized that it was not a candidate for inheritance and have prevented it from being extended.
To prevent inheritance, use the keyword “final” when creating the class . The designers of the String class realized that it was not a candidate for inheritance and have prevented it from being extended.