The following statement is used to prevent other classes to inherit from a class named Triangle.
public final class Triangle { }
Select one:
True
False
Answers
Answered by
0
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.
Similar questions