GeeCON Prague 2014*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes doubt in final keyword with array Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "doubt in final keyword with array" Watch "doubt in final keyword with array" New topic
Author

doubt in final keyword with array

Vaibhav Chauhan
Ranch Hand

Joined: Aug 16, 2006
Posts: 115
Code:

final int[]array={1,2,3};

what is the role of final here.....as the content of the array can be changed.If the reference to an object is made final, it can not refer another object....What is the use of final in above case ??


[HENRY: Fixed subject header]
[ August 18, 2006: Message edited by: Henry Wong ]
Vaibhav Chauhan
Ranch Hand

Joined: Aug 16, 2006
Posts: 115
sorry i posted the ques. under wrong subject.....
.
.
.
Neelesh Bodas
Ranch Hand

Joined: Jul 20, 2006
Posts: 107
Vaibhav Chauhan
Ranch Hand

Joined: Aug 16, 2006
Posts: 115
thanks neelesh....i got it.
 
GeeCON Prague 2014
 
subject: doubt in final keyword with array