Home > Uncategorized > Deep copy, shallow copy analogy from security perspective

Deep copy, shallow copy analogy from security perspective

Copy Constructor is about deep copying of java objects. Deep copy of objects are important for security and maintainability of java codes. I will not explain copy constructor or deep copying and shallow copying, Instread, I will try to give some analogy of deep or shallow copying.

 

  1. Suppose, we have a photograph of somebody (some kind of copying). Now, how terrible it will be if by hurting the photograph,  someone can hurt the person in the photograph ? Deep copying from the sense of security is  having a photograph (or shadow) by hurting it, you cannot hurt the person.
  2. On the other hand, shallow copying is analogous of having the twin of the victim where there is some string attached.

 

 

Advertisements
Categories: Uncategorized
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: