int
What's this data type?
integer (stores a number)
how do you add two integers in java?
with +
How do you make Java comments (list two types)?
// single line or /* */ multi-line coments
How do you store this data?
6.77f
float myNum = 6.77f;
How do you deincrement something?
with --
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)
What do you use store a single letter
The char data type.
How do you return the division remainder?
with %
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).
How do you store a sentence in java?
String myString = "my sentence";
How do you fix this code to run if it's false.
if (myB) {}
by adding a exclamation mark (!)
if !(myB) {}
What do you use the statement Brake in?
A while, and for loop.
Can you store a binary digit in Java, and if so how?
boolean myBoolean = true; boolean myBoolean = false;
(true = 1, and false = 0.)
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) {}