Java Reference
In-Depth Information
ids
X
1
2
3
clonedId
X
Memory state after the following statements are executed.
int[ ] ids = {1,2,3};
int[ ] clonedIds;
Figure 15-2. The ids array is populated and the clonedIds array is declared
ids
X
1
2
3
clonedId
X
1
2
3
Memory state after the following statement is executed.
clonedIds = (int [ ]) ids.clone ( );
Figure 15-3. The ids array is cloned in the clonedIds array
names
X
Kathy
Lisa
Pat
clonedNames
X
Memory state after the following statements are executed.
String names = {"Lisa", "Pat", "Kathy"};
String[ ] clonedNames;
Figure 15-4. The names array is populated and the clonedNmaes array is declared
 
Search WWH ::




Custom Search