1/28
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Scanner class
Used to get user input, and it is found in the java.util package
nextBoolean()
Reads a boolean value from the user
nextByte()
Reads a byte value from the user
nextDouble()
Reads a double value from the user
nextFloat()
Reads a float value from the user
nextInt()
Reads a int value from the user
nextLine()
Reads a string value from the user
nextLong()
Reads a long value from the user
nextShort()
Reads a shoirt value from the user
Operators
Symbols that perform operations on variables and values.
+
-
*
/
%
Modulus operator
This divides two numbers and returns the remainder
Assignment operator
Used to assign values to variables.
Relational operators
Used to compare two values or variables. The return value of a comparison is either true or false. These values are known as Boolean values.
Equal to
Not equal to
Greater than
Lesser than
Greater than or equal to
Lesser than or equal to
Logical operators
Used to determine the logic between variables or values. Can also test for true or false values.
Logical AND
Logical OR
Logical NOT
Methods
A block of code which only runs when it is called.