Week5Chap4-II

Week5Chap4-II - Chapter 4 Control Statements in Java...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
Janaka Balasooriya CSE 110, Arizona State University Chapter 4 Control Statements in Java Selection
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Quick Recap Java provides control structures to facilitate Selection and Repetition . Selection and Repetition involve in decision making during the execution of the program Decisions are made by evaluating logical expressions Logical expressions are constructed using relational operators such as <, >, <=, >=, != and ==. Logical expressions produce Boolean values (true/false) Arithmetic operators have the higher precedence over relational and logical operators Example What is the final truth value ? Janaka Balasooriya CSE 110, Arizona State University
Background image of page 2
Selection Janaka Balasooriya CSE 110, Arizona State University
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Janaka Balasooriya CSE 110, Arizona State University One Way Selection expression statement Java code (syntax): if (logical expression) statement (s) Example:
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/08/2010 for the course CSE 110 taught by Professor Kim during the Spring '08 term at ASU.

Page1 / 12

Week5Chap4-II - Chapter 4 Control Statements in Java...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online