KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Possible Duplicate: Final arguments in interface methods - what’s the point? While trying to experiment a few things, I've ran into a problem that it's described in this page . interface B { public int something(final int a); } abstract class C { public int other(final int b); } class A extends C implements B { public int something(int a) { return a++; } public int other(int b) { return b++ } } Why is such feature possible? I don't know why it's possible to to make a final parameter into a non-final one by just overriding the method. Why is the final keyword ignored in a method signature? And how do I obligate sub-classes to use in their methods final variables?
Tags (comma-separated)
Save Edits
Cancel