variables
methods
Strings
Random
Scanner
100

this type of variable stores a number with a decimal point

what is a double!
100

what is the third word in a method header? (if the method is static)

return type

100

what does charAt(index) do?

returns the character at that index of a String

100

key words for if statements

if, else if, else

100

How do we initialize a Scanner?

Scanner name = new Scanner (System.in);

200

what type of variable does 5 / 3.0 return?

a double!

200

how many parameters can a method have?

as many as you want :)


200

True or False, Strings are a primitive type

false

200

What are two different ways to end your line with a new line ?

use System.out.println or the newline character "\n"

200

What do Scanners do?

read user input

300

all chars are also ...

ints

300

what keyword is used to exit a method and send information elsewhere ?

return

300

What is the difference between a String and a String literal?

String is a variable containing a sequence of letters,

String literal is character sequence with double quotes, as in "Hello"

300

what will this print?

System.out.printf("%.2f monkeys", 10.23456);

10.23 monkeys

300

How do we read in a String from the user?

scannerName.next();
400

casting is ...

converting one variable type to another

400

how do we call a method?

methodName(parameters)

400

what mathematical operator gives us a remainder?

modulo %

400

What will this print?

System.out.println( 10 + 20 + 30 + 40);

100

400
True or False: Scanners are objects

True

500

The difference between instantiating and declaring a variable is...

instantiating sets the value, declaring allocates memory space (leaves variable empty)

500

what is the return type for a method that doesn't return anything?

void

500

What would this return?

String str = "Hello";

str.charAt(5);

error!
500

which line would print?

String str = "Michael";

if(str.charAt(0) == 'm')

System.out.println("One");  //option 1

else

System.out.println("Two"); //option 2

Two

500

How do we read in a single character from the user?

scnr.next().charAt(0);

M
e
n
u