Parameters, Numeric types, Conditionals
Parameters
Class Examples:
Spirograph
Scribble
Numeric types
primitive types:
several, but for right now interested in
int
and
double
no constructor, can't call methods
can use operators such as +, -, /, *
for integers can use %, ++, --
An example that makes use of an integer variable: Click on
ClickCounter
to show the example.
Discussion of string literals and the "+" operator
Conditionals
Syntax of an if statement:
if (
) { // statements to be executed if condition true }
Class examples:
BasketBall