Today while searching for a certain piece of code from google, I came across one Q/A blog, where its been said that we can declare a local variable inside a method of a class to be final. However, the author was reluctant enough to explain the need/ benefit of doing so.
like
public class A
{
private void show()
{
final String s="checking";
}
}
I would seek java gurus' help to educate me on this. Thanks in advance for your kind support and guidance.
Best regards!