Use LEFT and RIGHT arrow keys to navigate between flashcards;
Use UP and DOWN arrow keys to flip the card;
H to show hint;
A reads text to speech;
16 Cards in this Set
- Front
- Back
Standard Main Method |
public static void main(String[] args) { } |
|
Comment |
Begins with // and is a description in the program, does not tell the system to do anything |
|
variables |
int |
|
2 ways to declare a Variable |
int myNumber = 88;
or
int Mynumber;
myNumber = 88 |
|
How many primitive types of variables in java? |
int myNumber
short myShort = 16 bit number
long myLong = long number
double myDouble = 7.324 15 digits
float myFloat = 324.3;
char myChart = 'y'; 16 bit unsigned
bolean myBoolean = true or false
byte myByte = 127; 8 bit number |
|
int |
used to count things
primitive, not an object
mutable - can change value any time
contains a single int field |
|
Ctrl+shift+f |
format |
|
boolean |
true or false |
|
i ++ short cut |
i = i + 1 |
|
for loop |
can declare integer two semi colons |
|
System.out.printf( %d, i) |
string with format specifier |
|
\n |
new line |
|
!= |
does not equal
boolean cond = 5 != 8; system.out.println(cond);
"true" |
|
== |
test for equality |
|
int myInt = 20; }
|
blank |
|
int myInt = 30; }
|
"No it's false!" |