Review the Exams You Took

Total Page:16

File Type:pdf, Size:1020Kb

Review the Exams You Took

Final Exam Review

 Half of the final will be over review material. See the reviews for Exam 1 and Exam 2 for those topics. ◦ Review the exams you took.  New topics since the last exam:

 Chapter 4  4.1 Constant variables ◦ final keyword  4.3 Math methods ◦ esp. Math.sqrt, Math.abs ◦ No trig functions ◦ Only methods from lecture on the final.  4.4 Type Conversions ◦ implicit vs. explicit ◦ Illegal assignment of double to int ◦ Casting ▪ double d = (double) n; //Where n is an int ◦  4.6 Characters ◦ char type ◦ Primitive that holds just one character.  4.7 String class ◦ Reference type ◦ Garbage collection ◦ Escape characters ◦ Concatenation with + operator ◦ trim, length, substring methods ◦ Scanner next and nextLine methods to read Strings ◦ equals vs ==

 Chapter 9 ◦ 9.2 Constructors ▪ constructor syntax  Same name as class  No return type in heading  Called with new operator  Default constructors ◦ 9.3 Overloading Constructors ▪ Parameterized constructors ▪ How does processor know which constructor to execute ◦ Chapter 5 ▪ 5.1 if statement.  Compound statements – statements between { } ▪ 5.2 Relational Operators  ==, < , >, >=, <=, !=  equals vs. == with Strings ▪ 5.3 Multiple if-else branches ▪ 5.4 Logical operators  &&, ||, ! ▪ boolean data type  primitive type with true or false value.

◦ Chapter 6 ▪ while loop ▪ Initialize, test, process, update ▪ for loop

Recommended publications