Intro to Java; Info & Math in Java Flashcards
how does software work?
u boot the PC & it starts reading instruction from the storage device
the bytes r interpreted as instructions by the PC
the instructions = software –> created thru the process of programming
programming
giving sequential instructions to a computer system
done using a programming language
programming language
turned into instructions for a CPU by a compiler
series of rules that u follow to write English-like text representing abstract instructions
Ex: Java
compiler
a translator from the programming language instructions to the byte instructions used by the CPU
programming constructs
many programming languages have similar capabilites
Integrated Development Environment (IDE)
something like BlueJ that combines a text editor with a compiler
code
the text of a program
Java’s naming rules
starts with letter
can contain letters, #’s, $, and _
no spaces
case sensitive
sample print statement
public class CompSci {
public static void main (String [] args)
{
System.out.println("Hello World!");
}
}
whitespace
spaces, tabs, etc.
values & types
Java & all other programming languages have diff types of info
Ex: strings, integers, doubles, and Booleans
strings
look like text inside of a pair of quotation marks
integers
same thing as integers in math - whole #’s with no decimal point
doubles/floating-point values
what we might call real #’s in math - #’s that have a decimal point
Booleans
only 2 values: true and false
in Java, the words true and false (lowercase) r reserved for Boolean values