public class CloneArray { public static void main(String args[]) { int [] array = { 1,2, 3, 4, 5}; int [] cloneArray = (int[])array.clone(); for(int i=0;i<cloneArray.length;i++){ System.out.println(cloneArray[i]); } } }
Thanks
December 12, 2011 at 5:26 PM
Interview questions
Related Pages:
cloning - Java Beginners
cloning Dear Sir,
Can you send a simple java program for CLONING an object
About Object cloning. - Java Interview Questions
About Object cloning. what is Object cloning? can u explain... is said to be object cloning.In java, it has to be done using clone() method.
For more information, visit the following link:
http://www.roseindia.net/java
java cloning - Java Interview Questions java cloning how to clone an array??? Hi Friend,
Try the following code:
public class CloneArray {
public static void main(String args[]) {
int [] array = { 1,2, 3, 4, 5};
int [] cloneArray = (int
Cloning a XML Element Cloning a XML Element
 ...; element in the DOM tree. In general, the cloning means to create a duplicate. ...;
</Employee>
</Employee-Detail>
Here is the Java File
java
();) {
((Int) e.next()).increase();
}
System.out.println("List after cloning
PHP Clone Object
PHP Clone Objects:
Meaning of clone is that make multiple identical copies of the original one, the process of cloning in PHP 5 is quite different from PHP 4... method is used to control the cloning process.
A clone object is created
Lack of Streaming leads to Screaming - Java Tutorials
Lack of Streaming leads to Screaming
2002-05-24 The Java Specialists....
Welcome to the 46th edition of The Java(tm) Specialists'
Newsletter... of tips on how to do complicated things in
Java. The electronic book was put
Core Java Interview Question, Interview Question
mentions a shallow copy in Java?
Answer: Object cloning.
Question: If you're...
Core Java Interview Question Page 2
 ... a Vector and an ArrayList
Answer: Java Vector class is internally synchronized
Java DOM Tutorial Java DOM Tutorial
 ...
element from the XML document. The JAXP (Java APIs for
XML....
Cloning a XML Element
In this section, you will learn to create a clone