= a programming language + platform
= an environment for running other programs
This is all included in the JDK
(Java Development Kit)
Java Virtual Machine
(virtual computer)
= a program that transforms source code into
machine code
= names associated with values in a computer
variables allow programmers to save data and reference it later
ex: myAge, student9, isAlwaysOnTime
every variable in Java has a type
= a set of values and operations on those values
true or false
= represents a single character ('a', '$', '9')
denote a char by placing it between single quotes ' '
(not a primitive type)
= sequence of characters denoted by double quotes
= the operation of joining strings together
ex. "Hello, " + "World!";
what are some real world examples of software using control structures?
if (7 > 3) {
System.out.println("Math is real");
}
System.out.println("This always executes");
if (7 > 3) {
System.out.println("Math is real");
} else {
System.out.println("Math is a lie");
}
System.out.println("This always executes");
// aq is at the cinema
if (age <= 13) {
ticketPrice = 8;
} else if (age <= 64) {
ticketPrice = 13;
} else {
ticketPrice = 10;
}