0% found this document useful (0 votes)
13 views24 pages

Lecture 4

The document discusses Object Oriented Programming concepts in Java, focusing on access modifiers, the 'this' keyword, and constructors including copy constructors. It explains the differences between shallow and deep copies, emphasizing the importance of creating independent objects when copying. Additionally, it highlights the risks of unsafe copy constructors that share references to mutable objects.

Uploaded by

Umair Ahmad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
13 views24 pages

Lecture 4

The document discusses Object Oriented Programming concepts in Java, focusing on access modifiers, the 'this' keyword, and constructors including copy constructors. It explains the differences between shallow and deep copies, emphasizing the importance of creating independent objects when copying. Additionally, it highlights the risks of unsafe copy constructors that share references to mutable objects.

Uploaded by

Umair Ahmad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 24

You might also like