APCSA - Math and Inputs in Java

0.0(0)
studied byStudied by 0 people
0.0(0)
linked notesView linked note
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/8

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

9 Terms

1
New cards

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).

2
New cards

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.

3
New cards

Division with two integers

In Java, performing division with two integers (e.g., 3/6) truncates the decimal, resulting in 0.

4
New cards

Modulus operator (%)

An operator in Java that returns the remainder of a division operation.

5
New cards

Example of modulus

System.out.print(8%3) outputs 2 because the remainder of 8 divided by 3 is 2.

6
New cards

Scanner in Java

A class used to obtain user input in Java by importing java.util.*.

7
New cards

scanner.nextLine()

A method used to read input from the user as a string.

8
New cards

scanner.nextInt()

A method used to read an integer input from the user.

9
New cards

scanner.nextDouble()

A method used to read a double input from the user.