🔥Implementing Deep Copy | Design Pattern Series
HTML-код
- Опубликовано: 4 июн 2023
- Implementing Deep copy while clonning java object .
Full series
Telegram Link for Doubt: t.me/learncode...
Important Videos:
➡️React JS with Project : • 🔥 🔥 Complete React Js ...
➡️Learn JDBC in one video: • JDBC Crash Course in 1...
➡️Learn Python in One Video: • Learn Python in One Vi...
➡️Learn HTML in one video: • Jquery in one video in...
➡️Learn HTML form in one video: • Jquery in one video in...
➡️Learn JavaScript in one videos: • Learn JavaScript in O...
➡️Learn Form Validation using javascript and jquery: • Form Validation using ...
➡️Learn CSS in one video: • Jquery in one video in...
➡️Jquery in one video: • Jquery in one video in...
Kotlin is one video: • Kotlin | Learn Kotlin ...
➡️Complete Python Project - RUclips downloader in one video: • Jquery in one video in...
Important Playlist:
➡️Spring Boot Tutorial with Project : • Spring Boot Tutorial i...
➡️Spring MVC Tutorial: • Spring MVC Tutorial St...
➡️Complete Spring Framework Tutorial: • Spring Framework Tutor...
➡️Hibernate Tutorials: • Hibernate Tutorial for...
➡️E-Commerce Project using Java: • E-Commerce Project usi...
➡️AWS Free Java Hosting Playlist: • AWS Hosting Tutorial |...
➡️Hibernate Tutorial Playlist: • Hibernate Tutorial for...
➡️Learn Technology in One Vides: • Learn in one video : C...
➡️Programming Tips for Programmers: • Coding Tips and Discus...
➡️Complete Python for Beginners: • Complete Python Tutori...
➡️Important Python Projects: • Python Projects in Hindi
➡️Complete Servlet & JSP : • Servlet and Jsp (Serve...
➡️Complete JDBC ( Java Database Connectivity) : • JDBC(Java Database Con...
➡️Complete Java Project : TechBlog: • Full Java Advance Pro...
➡️Java Swing Projects: • Java Projects for begi...
➡️Java Core Concepts: • Java Core Tutorial
➡️Kya aap Jante hai Series: • kya app jante hai : s...
Important Links:
👉Official Website (Source Code): learncodewithd...
👉Telegram Discussion Group: t.me/learncode...
👉Follow me on Instagram: / durgesh_k_t
👉Follow on Facebook / learncodewithdurgesh
Disclaimer:
All videos are for educational purposes and use them wisely. Any video may have a slight mistake, please take decisions based on your research. This video is not forcing anything on you.
Aag laga diya aag laga diya😂😂
Hi Durgesh,
I have one doubt, in case of deep copy we are creating new object when clone method is being called, but in previous video of prototype design you told that we copy an existing object rather than creating a new instance from scratch.
So, how deep copy will follow prototype design pattern?
Please create a project where we can include chatGPT API in our application from where we fire request front end by asking any questions & it will process in backend completely and pass the result. Or only backend also fine.
Very few videos available in RUclips regarding this, hence explain this concept. Full Stack representation will be appreciated 😊
Sir - I have a doubt that during deep copy, you have created the NetworkConnection object using new keyword, what if the constructor involves complex logic? If we are going to use new Keyword to create NetworkConnection Object then why call clone in the first place, we can call the constructor directly from client side - but how then does it follow the spirit of Protoype Design Pattern?
Yes @user-kv1dx8hp8l you're right. In order to tackle this we will have to overload the constructor and this newly overloaded constructor will have the logic to set the object members from the older object using 'this' keyword.
public class NetworkConnection{
public NetworkConnection( ){} // original constructor
public NetworkConnection( NetworkConnection networkConnection){ //overloaded constructor
this.ip = networkConnection.ip;
this.importantData = networkConnection.importantData;
List deepCopyDomains = new ArrayList();
for( domain in networkConnection.getDomains()){
deepCopyDomains.add(domain);
}
this.domains = deepCopyDomains;
}
@Override
public NetworkConnection clone( ){
return new NetworkConnection(this); // Note: that we are not creating new object from scratch here because we are not calling the original constructor an infact calling // //the overloaded constructor which just copies value from existing object.
}
}
Hope this helped for all who were stuck like me with the same question
Sir What is Your PC Configuration
Hi sir i am from CSE background and now i have 3 offers please suggest which one is better for me?
1. Infosys system engineer 3.6lpa
2. SYMB technology software engineer 4lpa
3.Tata Steel AEP CS/IT domain 7lpa
kaunsa lia bhai? ye to reply e nehi dia
👍👍👍
Hi Sir
please Provide JavaEE Design Pattern pr bhi video lao
🙏👍
This is literally deep cloning, nothing prototype design pattern here.
In prototype, one can clone(deep) different objects of superyype using an interface.
this is wrong way to clone a object. what bullshit is this :/