🔥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.

Комментарии • 13

  • @shalinisoni9034
    @shalinisoni9034 19 дней назад

    Aag laga diya aag laga diya😂😂

  • @dhruvgoel25
    @dhruvgoel25 3 месяца назад

    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?

  • @purnasahu8766
    @purnasahu8766 Год назад

    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 😊

  • @user-kv1dx8hp8l
    @user-kv1dx8hp8l 9 месяцев назад

    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?

    • @utkarshgupta4276
      @utkarshgupta4276 4 месяца назад

      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

  • @SFAbhi9642
    @SFAbhi9642 Год назад +1

    Sir What is Your PC Configuration

  • @ayushrastogi7485
    @ayushrastogi7485 Год назад

    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

    • @suar_pilla
      @suar_pilla 4 месяца назад

      kaunsa lia bhai? ye to reply e nehi dia

  • @AditiNath1234
    @AditiNath1234 Год назад

    👍👍👍

  • @ShivamKumar-se1fo
    @ShivamKumar-se1fo 7 месяцев назад

    Hi Sir
    please Provide JavaEE Design Pattern pr bhi video lao

  • @rishiraj2548
    @rishiraj2548 Год назад

    🙏👍

  • @thevagabond85yt
    @thevagabond85yt 8 месяцев назад

    This is literally deep cloning, nothing prototype design pattern here.
    In prototype, one can clone(deep) different objects of superyype using an interface.

  • @suar_pilla
    @suar_pilla 4 месяца назад +1

    this is wrong way to clone a object. what bullshit is this :/