Presentation is loading. Please wait.

Presentation is loading. Please wait.

Announcements Exam 1 Grades Posted on Blackboard.

Similar presentations


Presentation on theme: "Announcements Exam 1 Grades Posted on Blackboard."— Presentation transcript:

1 Announcements Exam 1 Grades Posted on Blackboard

2 Iteration Iteration (Looping): Performing a Series of Statements Multiple Times until Some Condition Is Met. Eliminates the Need for Redundant Coding or Method Calls Many Ways to Loop in JAVA

3 The while Loop Syntax: while (condition) statement; while (condition)
{ statement; }

4 while Example final int MAX = 100; int counter = 0;
while (counter < MAX) { System.out.println( counter); counter++; }

5 Example while Loop int numEmployees,curNum = 0;
System.out.print(“Enter Number of Employees: “); numEmployees = scan.nextInt(); if (numEmployees > 0) { while (curNum < numEmployees) System.out.println( “Welcome to CorpLand!” ); curNum++; }


Download ppt "Announcements Exam 1 Grades Posted on Blackboard."

Similar presentations


Ads by Google