Home » Online Computer Education » Learn Fundamentals of Java Programming “Repetition Structures in Java Programming ” Lesson 11

Learn Fundamentals of Java Programming “Repetition Structures in Java Programming ” Lesson 11

Repetition Structures

In real life you often do something repeatedly, for example, consider a task such as reading a book, first you open the book, and then repeatedly – read a page; flip the page – until you get to the end of the book, then close the book.

Java fundamentals  flow control 4

Similarly, when writing programs, you might need to perform the same sequence of statements repeatedly until some condition is met. The ability of a computer to perform the same set of actions again and again is called looping. The sequence of statements that is repeated again and again is called the body of the loop. The test conditions that determine whether a loop is entered or exited is constructed using relational and logical operators. A single pass through the loop is called an iteration. For example, a loop that repeats the execution of the body three times goes through Java provides three statements – the while statement, the do while statement, and the for statement for looping.

About

The main objective of this website is to provide quality study material to all students (from 1st to 12th class of any board) irrespective of their background as our motto is “Education for Everyone”. It is also a very good platform for teachers who want to share their valuable knowledge.

Leave a Reply

Your email address will not be published. Required fields are marked *