aspose file tools*
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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
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.
 
wood burning stoves
 
subject: doubt in final keyword with array
 
Similar Threads
arrays & final
Doubt About Object Reference Casting Rule
not initialized
Array Declaration
How I get byte[ ] from Object?