您的位置:寻梦网首页编程乐园Java天地Core JavaJava Lecture Notes

Introduction

Content

Apply

Reflect

Extend

previous.gif
 (3087 bytes)
next.gif
 (2959 bytes)

 
Content Index
Content Page # 19

Execution in sequence

Unless specified otherwise, when the program has finished executing one statement, it will go on to the next one it encounters. It's as simple as that. For example, the statements below would be executed in just the order they occur:

age = 21;

ageNextBirthday = ( age + 1 );

ageInDecades = (age % 10);

The first statement to be executed will be:

age = 21;

The second statement to be executed will be:

ageNextBirthday = ( age + 1 );

The third statement to be executed will be:

ageInDecades = (age % 10);

Back to top

basicline.gif (169 bytes)

RITSEC - Global Campus
Copyright © 1999 RITSEC- Middlesex University. All rights reserved.
webmaster@globalcampus.com.eg