In the lecture everything is pretty simple and well explained. The only thing I am unsure of is the primitive data types and when one should be chosen over another. I would be happy if you could explain or go over what may be the reasons for choosing one data type for example 'long', over another type like 'double'.
This was already questioned one week ago but I want to give some additional help using an example:
Assume you want to store the mass of an item in a variable. Which of the fundamental types should be chosen and which representation might be useful? If you take a whole number (i.e. int or long), you need to take a very small unit, a gram or a milligram, for example. If you take larger units instead (e.g. kilogram, lb) you lose the ability to specify lower masses (e.g. half a lb). If your granularity is too small, however, you will be more limited by the maximal mass you can specify. If you have milligrams as granularity and select int as fundamental type, you cannot represent a mass that exceeds 2147 tons. Even if you switch over to long you will come into trouble if you want to be able to represent the mass of our galaxy (1044 gram) and that of a hydrogen atom (1.67 * 10-24 gram) in the same integer type as 226 bits would be required for this.
And most of the bits would be wasted as nobody knows the mass of our galaxy up to the precision of a atom's mass. On the other hand, both values can be perfectly represented using a float with 32 bits, giving you a roughly precision of 7 decimal places, and a switch to double extends that precision to ca. 14 decimal places.
You might wonder why it is worth to bother with integer types at all when floating point is so cute. Following points speak against floating point types:
I don't think that there was really anything that was confusing about the class last week, but I think that there could have been more explanation about the state of memory diagram.
Thanks for the suggestion. I have addressed this now in the lecture on January 7th, 2002.
Problems which i encountered in the two classes which i had this week apart from the test would be in regards with the naming conventions presented by you and the Java Book by Wu. It is kind of confusing when you name it or call it one way and the book refers to it by another way. It would be of a great help if you could put page no. in your slides telling us which page to refer to in the book.
I have to admit that the book is for me new as well (it wasn't selected by me anyway) and had no time to look more deeply in it. As many naming conventions are used in Computer Science, it is not unlikely that differences emerge. It would be helpful for me, however, if you could give concrete examples so that it can be clarified in this forum or in the lecture. A final note: Books (at least in my point of view) are companions to a course but courses are not necessarily based upon them. The schedule gives you some hints about which chapters are to be read in which week.