Class review - PowerPoint PPT Presentation

1 / 5
About This Presentation
Title:

Class review

Description:

... float, double, char, boolean. Conversion (widening and ... Boolean expressions. Equality and relational operators. Logic operators. Precedence! Conditionals ... – PowerPoint PPT presentation

Number of Views:18
Avg rating:3.0/5.0
Slides: 6
Provided by: zha56
Category:
Tags: boolean | class | logic | review

less

Transcript and Presenter's Notes

Title: Class review


1
Class review
  • Chapter 1
  • Computer System (CPU, Main Memory, Secondary
    Memory Devices, Input/Output devices)
  • Binary number system
  • Appendix B and the required reading
  • Java
  • Architecture-neutral
  • Bytecode
  • Compiler
  • Programming languages at different levels
  • Case sensitive
  • Identifier

2
Class review
  • Chapter 2 (data expressions)
  • Primitive data types
  • byte, short, int, long, float, double, char,
    boolean
  • Conversion (widening and narrowing)
  • Unicode character set
  • Expressions
  • Assignments and arithmetic operators (, -, , /,
    )
  • char b'A'
  • System.out.println(b3)
  • System.out.printn(b)
  • Precedence (, /, gt , -)
  • Scanner class

3
Class review
  • Chapter 3
  • Create an object (new)
  • Special treatment for String
  • Creation, manipulation
  • Object references
  • Java standard class library
  • Java.lang, java.util,
  • Math, String, Random and their methods
  • Static methods
  • Enumerated types (type-safe, ensuring that
    invalid values will not be used.)
  • Wrapper class
  • Allows a primitive value to be used as an object.

4
Class review
  • Chapter 5
  • Boolean expressions
  • Equality and relational operators
  • Logic operators
  • Precedence!
  • Conditionals
  • if, if-else
  • In a nested if statement, an else clause is
    matched to the closest unmatched if.
  • switch
  • Break, default
  • Integral values
  • Relative order of characters and strings

5
Class review
  • Chapter 5
  • Loops
  • While, do-while, for
  • A while statement will execute the same statement
    until its condition becomes false
  • A do statement executes its loop body at least
    once.
  • A for statement is usually used when a loop will
    be executed a set number of times
  • Nested loops!!!
Write a Comment
User Comments (0)
About PowerShow.com