If I remove the final keyword from a method or other “thing”, will users of my class have to recompile?
If I remove the final keyword from a method or other thing, will users
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
Technically, they won’t have to recompile.
I cannot think of any repercussions that can result from removing the final keyword from a method / attribute which may lead to loss in compatibility so it should not give you any problems.
Tested with sample code and there were no runtime errors:
Modified Test2.java:
Compiled Test2.java