The Artima Developer Community
Sponsored Link

Java Answers Forum
How to copy from one array to another array?

1 reply on 1 page. Most recent reply: Jul 13, 2006 10:30 PM by Matthias Neumair

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
joe smith

Posts: 21
Nickname: jetbrains
Registered: Jan, 2006

How to copy from one array to another array? Posted: Jul 13, 2006 6:39 PM
Reply to this message Reply
Advertisement
Copying java arraysAll java array types implement the Cloneable interface, and any array can be copied by invoking its clone( ) method.

int[] age = { 21, 31, 16 };
int[] copyage = (int[]) age.clone( );

See full article
http://www.developerzone.biz/index.php?option=com_content&task=view&id=154&Itemid=36


Matthias Neumair

Posts: 660
Nickname: neumi
Registered: Sep, 2003

Re: How to copy from one array to another array? Posted: Jul 13, 2006 10:30 PM
Reply to this message Reply
So what?

The article describes it pretty good.


What is it you didn't understand?

Flat View: This topic has 1 reply on 1 page
Topic: Thread question Previous Topic   Next Topic Topic: Still in love with my bag!

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use