+ 4

Is there no concept of copy constructor in java?

How do I make an object with variables having values same as that of an already created object in java?

12th Dec 2021, 8:55 AM
Ruchika Sehgal
Ruchika Sehgal - avatar
1 ответ
+ 4
public class Concept{ private String trueConcept; public Concept(Concept concept){ this.trueConcept = concept.trueConcept } }
12th Dec 2021, 10:28 AM
Alexey Kopyshev
Alexey Kopyshev - avatar