11.3 Object Cloning in Java part 2

preview_player
Показать описание
Shallow Copy:-Shallow copy means to make a copy of the reference to obj into obj1. It is simply say that call bye value.
Deep Copy:-It makes a copy of all the members of obj, allocates memory in a different location for obj1 and then assigns the copied members to obj1 to achieve deep copy.Deep Copy means call by value.
Clone:- Cloning is the process of actually making another exact replica of the object instead of its reference.

Clonable interface, Object clone()

Follow on Facebook:

Subscribe to our other channel:
Telusko Hindi :

Subscribe to the channel and learn Programming in easy way.

Рекомендации по теме
Комментарии
Автор

One of the best channel for learning java concepts in detail.

omkardalvi
Автор

Hey Navin, as clone() method is protected it should be accessible with in subclass ABC(all classes are sub classes of Object class if they are not extending any other class).Why it is not accessible? Please explain.

swathiallu
Автор

The way you explain as if exploring yourself is a effective method, really is better than presenting the solution all at once. But the sound quality is really pooor! But thank you for making these videos.

nynra
Автор

IF ALL CLASSES INHERIT OBJECT CLASS, SHOULDN'T THEY BE ABLE TO ACCESS METHODS OF OBJECT CLASS WITHOUT EVEN OVERRIDING (IE, MAKING PUBLIC)? please explain...?

supreethr
Автор

Why the audio of some of your videos is soo low that one can hardly understand anything even in full volume.. ..you make such good tutorial, please don't ruin them coz of the poor audio

AdmirableShift
Автор

thanks for the clear explanation of this topic

ShermukhammadKarimov
Автор

Hello sir, you are really a good tutor.. I like your every video.. and really love this. I follow you for java.. but now I am confusing in that.. can you pls explain how this program work..? I am quite excited to know about this cloning concept..

tejashriraut
Автор

Nice Explanation. Is there a difference btw shallow copy deep copy on Collections ? Is it the same as explained above?

saahithvamsani
Автор

Thank you for the video. However, clone methods provides shallow copying, the reason the values got changed and it was perceived as a deep copy because the variables used are primitive. use clone method when the variables are object

gauravarya
Автор

This is really confusing.. & quality of sound is very low

dhineshvs
Автор

Simple and awesome explanation.
Expecting complex concepts on Spring and Hibernate (Dynamic pagination, multi file upload, etc)

firozpasha
Автор

Seems like in this case, the super.clone() does a "deep copy" because the class only contains int types, which are primitive type fields?

gracechen
Автор

Beautifully explained!! You are such a wonderful tutor

shivayanmukherjee
Автор

First Confusing Lecture i have seen of Navin Reddey You should delete and re make it again

EatCodeTravel
Автор

this is not complete reference about cloning i think geeksforgeeks is best to understand cloning, sir please make changes in this video

anujbirani
Автор

Sir I have 1 que, what to do if we want to use object of first base class created in inherited class and also in third class that inherited by second class (means in multi level inheritance). In short base class having r object and I have to use it in both inherited classes. So replay sir as soon as possible, bcoz I am working on one project, then it will help me lot.
Thank u

shubhampisal
Автор

great one! thank you, but I think it would be better if you realised up your voice, overall it's good :)

nooralmanasrah
Автор

the example given here for deep cloning is not great as its been done on primitive types
rather it should be done on objects

pankajupreti
Автор

Everything is explained very well but..
If cloneable is a marker interface and has no methods or variables in it, what is the purpose of implementing it to execute the clone function? What difference is it making in the execution of this program?

stars
Автор

4:15 May I know How (Abc) helped to remove error?, I mean what it did really do? whats that used for?
I'm eagerly waiting for your response.
Thanks in advance!

TheRamdatta
visit shbcf.ru