views:

486

answers:

2

when i declared final arraylist() then can i perform insert,search and update operation in that arraylist or not??please reply me... thanks in advance

+1  A: 

Final means that the variable pointing to the arraylist can't change. But that does not mean that you can not call any method of the object, so you can perform insert, search and any other operation to the object

rossoft
I guess the language is Java
rossoft
A: 

If you're talking about Java's ArrayList, then, yes you can. Final means just that you can't change which ArrayList instance your variable refers to.

Joonas Pulakka