About local Final varibles in java

Posted by Sathish on Stack Overflow See other posts from Stack Overflow or by Sathish
Published on 2010-06-10T10:30:43Z Indexed on 2010/06/10 10:32 UTC
Read the original article Hit count: 289

In java Program, parameters which is defined as String in method declaration.But in method definition it is accessed as final String variable. Whether it'll lead to some issues (like security, memory problem)? For Example: Method Declaration join(String a,String b);

Method definition public void join(final String a,final String b) { Authenticator au = new Authenticator(){ public PasswordAuthentication getPasswordAuthentication(){ return new PasswordAuthentication(a,b)} }; }

Please help for me and clarify my doubts. Thanks in advance

P.S. I;m accessing a and b as final variable because i've to use it in the inner class.

© Stack Overflow or respective owner

Related posts about java

Related posts about final