What does “The Play Button” do? “javac.exe YourClass.java” Compilation “java YourClass” Execution on the Java Virtual Machine Input & Output To and from the console JOptionPane?
Strings & String operations Concatenation, charAt, substring
Scanner Input (console input println() Output Import statements
Boolean expressions (<,<=, !=, ==, …) Boolean variables If “tests” Loop “tests” AND, OR, and NOT Know the truth tables Given p and q
Single IFs If( test ) { } IF/ELSE If(test) { } else { } Chained IF/ELSE If(test1) { } else if { } else { }
Decision Statements (Selection Control Structures) Switch statements Loops (Repetition Control Structures) For While Do/While
Break and Continue “==“ versus “=“ versus “.equals( “foo” )” “Tracing variables” (is debugging) Variable Scope Local and Class wide
Sum the first 10 numbers Produce an average given 12 numbers Draw a box of stars Draw a triangle of stars
??
Closed book/notes, short questions 3-5 big questions 3-5 medium questions 3-5 small questions
Write a few lines of code that does Y Write a function that X Write a main that does z What does the following code do? What does it output? Tracing code What is the result of the following line(s) of code?
Labs! HWs! Lectures & In Class Demos Savitch
File IO Try/Catch printf