Computer >> Computer tutorials >  >> Programming >> Java

What is final parameter in Java


The final parameter is a keyword in java programming which is used to declare constants. for example

PIE, as you know the value of PIE, is 3.14 and it doesn't change therefore during programming you need to mention final int PIE.

also, by mentioning the final keyword in class and methods it restricts from inheritance and extending.