Welcome

Welcome to my blog.


I will be updating this blog with lecture notes and miscellaneous information for:

CSE 1030 : Winter Term
Prof. A. Eckford, Section-Z: MWF at 10:30 in R S137



Feel free to leave me a message or send me an e-mail at producap@yorku.ca.

Here is a link for MyMail, Hotmail, G-mail, and PRISM login.

On that note, you must have a PRISM account in order to write the lab tests.

If you have not created a PRISM account yet (e.g., if you received transfer credit for 1020), see the lab monitor in CSEB 1006 as soon as possible.

I will also leave the blog open to comments, etc. much like the CSE forums.

Thanks for visiting.

Phil.

Sunday, January 27, 2008

CSE Lecture 23/Jan/2008

Immutable classes are in effect "constant" objects. There is no reason to have more than one instance of an immutable object.

If I declare an object to be final, does that make the object immutable?

No. Final applies to the value in memory of the object.

An object is immutable if:

1) All the attributes are primitives, and private, and
2) None of the methods are mutators.

Mixed features of classes

-features that combine static and non-static features.
-static --> class
-non static --> features in the class.

Examples:

-Instance counter: how many instances of a class have been created.
-Serial number creator: every object is stamped with a unique serial number.

1 comment:

ed said...

Hi Philip
Hope you having a good reading week:)
I see you using Mac too and I am a new mac user so maybe you can spare some hints
In eclipse it doesn't recognize the @pre
it says unknown tag.
Thanks