Java Basics - Mutable vs Immutable Types

preview_player
Показать описание
This video demonstrates how shared mutable objects can affect data integrity and lead to unintended side effects. It also shows the impacts of changing a mutable type to an immutable type.
Рекомендации по теме
Комментарии
Автор

I am not qualified to comment on ur teaching.... just want to say ur method is very simple n person like me who has no or very little knowledge of programming can also off to bless u

suniljoshi
Автор

I got confused at the end. Isn’t the Person class mutable because you were able to change the address on the final example?

It was Greenville and stayed Greenville when you implemented “new” Moab. However, it changed to Draper when you did “new” Draper. So isn’t the change from Greenville to Draper make it mutable, not immutable?

Or was the setAddress just placed in Person to demonstrate that the memory address of “myAddress” does not change when you set a new address?

AG-jgqi
Автор

First, I am a fan of your clear, calm, pleasant presentation and delivery. You also make good visual aids and illustrations. Big fan, subscribed. In the UML ~0:52 or so, you seem to show Friend() method and refer to a Friend type in one or more methods. Was this a cut-and-paste error from an earlier class named Friend or was this as intended, and only looking like a constructor meant to be named Person() ??

jvsnyc
Автор

Is there more than one posting of this video? In the first slide, the Class name is Person, but the constructor is named Friend() which obviously implies some cut and paste error somewhere. I know I mentioned that somewhere else...maybe it made it into two different videos.

jvsnyc
Автор

Very Very Useful, one more doubt is gone for good. God Bless

Useruytrw
Автор

+MargretPosch Thanks a lot for explaining with Stack and heap memory.. It did help me a lot.

rakeshs
Автор

Hello Margaret, I believe in your other videos you used and IDE some name like JSR?

paula
Автор

Hello Margaret, which IDE you are using?

paula