Java Reading Notes
Sunday, November 13, 2011
final array
void foo() {
final int[] number = {1,2,3};
numbers[1] = 50; // is this legal?
}
legal, the final is on the array, so you can not change the length of array, but you can change the element
No comments:
Post a Comment
Newer Post
Older Post
Home
View mobile version
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment