Back to Primitive Types

Lesson PreviewLesson 1 of 7 in this unit

1.1 Why Programming? Why Java?

Part of Primitive Types in AP® Computer Science A. Read the opening section, then create a free account for the full interactive lesson, practice, and progress tracking.

Why Programming? Why Java?

Programming is just telling a computer what to do in code. Let’s say you program a robot, for example, to bake a cake.

We can’t just tell the computer to "bake a cake" in the code. Computers need to follow very low-level, specific instructions. To bake a cake, we need to explicitly tell the computer to:

  • preheat the oven
  • grease the pan
  • add cream, sugar, and butter
  • mix in eggs, vanilla, flour, and baking powder
  • cook the batter in the oven.

A series of steps to solve a problem is called an algorithm. Think of an algorithm as a procedure or a recipe to get the output that we want.

Well, how do we tell a computer what to do? There are several programming languages we can use to communicate with our computer. The programming language we will be learning in this course is called Java.

Continue the full lesson in Stellar

Create a free account to unlock the remaining sections, checkpoints, course practice, and progress tracking for AP® Computer Science A.