AP® Computer Science A glossary
Sequencing
Course: AP® Computer Science A Shows up in: Unit 1: Using Objects and Methods
The order in which the steps of an algorithm are completed: one at a time, in a set order.
Appears in the course and exam description (CED): 1.1.A.2
Sequencing defines when each step happens. Steps run one at a time, so changing their order can change the result: pour the water before boiling it and the tea is cold. Java statements also run in sequence, top to bottom.
int x = 2;
x = x * 10;
x = x + 1;
System.out.println(x);
Output:
21 Learn it properly, with a checkpoint 1.1 Introduction to Algorithms, Programming, and Compilers