Seating “chart” Front Back 4 rows 5 rows 5 rows 4 rows 2 rows 2 rows
Switch Intro and a few odds and ends 10/17/2014
Character data type explained Characters take 2 bytes in memory Under the covers they are ints Each int has a corresponding text symbol associated with it. See CharDemo.java
Ints and doubles compared Just like any other operation, relational operators can only operate on the same data type. So in a mixed operation, Java will attempt to widen the operands so that they match one another. See CharDemo.java
boolean data type Variables of boolean type hold true or false. We can declare variables of boolean and assign them values. A boolean expression is anything that evaluates to true of false. A boolean expression must go in the parentheses of an if statement. See CharDemo.java
Logic problems Your cell phone rings. Return true if you should answer it. Normally you answer, except in the morning you only answer if it is your mom calling. In all cases, if you are asleep, you do not answer. Answer demo
Switches Given a value, choose from among many options. Uses: Menus Anything that has multiple discrete choices See SwitchDemo.java