1/8
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
|---|
No study sessions yet.
PEMDAS
An acronym representing the order of operations in mathematics: Parentheses, Exponents, Multiplication and Division (from left to right), Addition and Subtraction (from left to right).
Division with a double
In Java, dividing an integer by a double (e.g., 3/6.0) gives a decimal result, such as 0.5.
Division with two integers
In Java, performing division with two integers (e.g., 3/6) truncates the decimal, resulting in 0.
Modulus operator (%)
An operator in Java that returns the remainder of a division operation.
Example of modulus
System.out.print(8%3) outputs 2 because the remainder of 8 divided by 3 is 2.
Scanner in Java
A class used to obtain user input in Java by importing java.util.*.
scanner.nextLine()
A method used to read input from the user as a string.
scanner.nextInt()
A method used to read an integer input from the user.
scanner.nextDouble()
A method used to read a double input from the user.