0

Can I inherit final methods in subclass?

26th May 2018, 3:23 PM
Shailesh Kodulkar
Shailesh Kodulkar - avatar
6 Answers
0
yes
26th May 2018, 3:32 PM
Shailesh Kodulkar
Shailesh Kodulkar - avatar
0
Give me an example 😄
26th May 2018, 3:33 PM
Robert Sokolov
Robert Sokolov - avatar
0
public class ShapeClass { final void setShape() { System.out.println("I am Inherited");; } public static void main(String[] args) { Circle c1 = new Circle(); c1.setShape(); } } class Circle extends ShapeClass { }
26th May 2018, 3:35 PM
Shailesh Kodulkar
Shailesh Kodulkar - avatar
0
I thought you meant overriding the method, but nevermind, why asking a question if you already know the answer? 😐
26th May 2018, 3:37 PM
Robert Sokolov
Robert Sokolov - avatar
0
it's ok
26th May 2018, 3:37 PM
Shailesh Kodulkar
Shailesh Kodulkar - avatar
- 1
No.
26th May 2018, 3:31 PM
Robert Sokolov
Robert Sokolov - avatar