final parameter

If you declare any parameter as final, you cannot change the value of it.


\begin{lstlisting}
class Bike11{
int cube(final int n){
n=n+2;//can't be cha...
...n(String args[]){
Bike11 b=new Bike11();
b.cube(5);
}
}
\end{lstlisting}

The output for the above code snippet will be Compile Time Error.