AP® Computer Science A glossary

Inclusive and exclusive

Also called: inclusive, exclusive

Course: AP® Computer Science A Shows up in: Unit 1: Using Objects and Methods

Describes an endpoint of a range: inclusive means the value can occur, exclusive means it cannot.

Appears in the course and exam description (CED): 1.11.A.3

Math.random() has an inclusive lower endpoint (0.0) and an exclusive upper endpoint (1.0). The pattern (int) (Math.random() * 6) + 1 gives 1 to 6, both inclusive.

Learn it properly, with a checkpoint 1.11 Math Class

Related terms

Was this page helpful?

No names are ever shown, and every public comment is checked by us first. Please do not include personal details. To get a reply, email [email protected].

↑ Top

Enlarged view of the selected figure