CS 2150 Lecture Notes - Lecture 3: Java Virtual Machine, Semicolon, Compile Time
Document Summary
Lecture 3: you can have private methods as well b. We can add things after the bracket and before the semi colon. getvalue() const; just returns a value and does not do anything or modifications. Intcell. cpp: equivalent to intcell::intcell(int initialvalue) {storedvalue=initialvalue;, different syntax, in java if you have a field that is final, you must have it declared at compile time. A destructor is used to destroy an object: you can define a constant using preprocessing xi. There is no equals nor is there a semi colon xii. You can just define it to exist, define a constant and then check it has or has not xiii. Ifndef will evaluate to true if it has not been defined xiv. at the top of every . h value, we are going to have an #ifndef, #define, #endif xv. #define -> macro definition (direct text replacement) xvi. Look at slide handout for preventing #include loops xvii.