A copy constructor is an alternative to the clone method, but it's not implicitly called like in C++ (that is by typing: Car c2 = c1)
This is an example of copy constructor:
public class Car { private int id; public Car() {} public Car(Car c) { id = c.id; } }
Copyright © 2013 Welcome to the website of Davis Fiore. All Rights Reserved.