data types (variables)
operators
random
100

int

What's this data type?

integer (stores a number)

100

how do you add two integers in java?

with +

100

How do you make Java comments (list two types)?

// single line or /* */ multi-line coments

200

How do you store this data?

6.77f

float myNum = 6.77f;

200

How do you deincrement something?

with --

200

How do you print things out in Java (and for extra points how do you not produce an extra line)?

By using System.out.println(); (for the extra point use to System.out.print(); not to produce another line)

300

What do you use store a single letter

The char data type.

300

How do you return the division remainder?

with %

300

What's abstract?

Abstract is both an abstract class is a restricted class that cannot be used to create objects (to access it, it must be inherited from another class), and an abstract method can only be used in an abstract class, and it does not have a body. The body is provided by the subclass (inherited from).

400

How do you store a sentence in java?

String myString = "my sentence";

400

How do you fix this code to run if it's false.

if (myB) {}

by adding a exclamation mark (!)

if !(myB) {}

400

What do you use the statement Brake in?

A while, and for loop.

500

Can you store a binary digit in Java, and if so how?

boolean myBoolean = true;                          boolean myBoolean = false;

(true = 1, and false = 0.)

500

How do you fix this code to rely on two operators (you can use a fake one like myB2) (also state both ways this can happen)?

if (myB) {}

You can use || as or, or && as and.

example answer one: if (myB && myB2) {}

example answer two: if (myB || myB2) {}