1 / 12

Test Review

Test Review. Week 6. Java Properties. Platform independence Three important properties in object-oriented language Encapsulation Inheritance Polymorphism. Variables. Declaration Definition Valid identifier e num type Assign values o rdinal(). Escape character. ’ ” \ <br> t.

sileas
Download Presentation

Test Review

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Test Review Week 6

  2. Java Properties • Platform independence • Three important properties in object-oriented language • Encapsulation • Inheritance • Polymorphism

  3. Variables • Declaration • Definition • Valid identifier • enum type • Assign values • ordinal()

  4. Escape character • \’ • \” • \\ • \n • \t

  5. Format output • System.out.printf(the first part, the second part); • Copy everything except the format specifiers in the firstparameterout to the output (processescape sequences). • The number of format specifiersinthe first parameter MUST be equal to the number of variables/values you wanttooutput in the secondparameter.

  6. Remainder % • Negative case • -17%-5 = -2 • Increment and Decrement • ++x; x++; • Y--; --Y;

  7. Operators • Arithmetic operators • Assignment operators • Relational operators • Logic operators • Short circuited version • Conditional operator • Operator precedence

  8. Type cast • Implicit cast • int double • Explicit cast • double x = 3.0; • int y = (int)x;

  9. Blocks • If • If…else • If…else if…else if…else • while • do…while • for • switch

  10. Nested loop • break • continue

  11. Enum and loop • Iterate all values using values() method • enum in switch statement • Infinite loop

  12. Exceptions using try…catch • Member variables • Local variables • Method call • Public method • Private method • Static method • Named constant • final

More Related