borich-avatar

What are the basic control structures in Java?

Can you determine the Java Basic Control Structures?
over 13 years ago
0%

8 replies

over 13 years ago
tomseller-avatar
" A Java program is a set of statements, which are normally executed sequentially in the order in which they appear. However, in practice, we have a number of situations, where we may have to change the order of execution of statements based on certain conditions, or repeat a group of statements until certain specified conditions are met. Java language possesses decision making capabilities and supports the following statements known as control or decision making statements : (1) if statement : The if statement may be implemented in different forms : a) Simple if statement b) The if---else statement c) Nested if---else statement d) Else if ladder (2) Switch Statement : (3) ? : operator : (a) The while statement : (b) The do statement : while(test condition); (c) The for statement Source: http://in.docsity.com/en-docs/Internet_Application_developement__Essay__Lecture_notes__VINOD"
over 13 years ago
country.side-avatar
" The body of the process in Java is made up of block which in turn encloses some sort of succession connected with assertions in tooth braces. Hitherto we now have witnessed (about) pursuing assertions: Epithet Format along with Illustrations Declaration Changer Form Identifier Initializer ; int i; closing forked pi = three or more.14159265358979323846; Appearance Record Expression ; this particular.gallons = this.gallons + gallons; record = brand-new FuelLog(initialMileage); log.fillUp(usage, gallons); Reappearance Record reappearance Manifestation ; reappearance (distance - initialMileage) / gallons; returning; Vacant Declaration ; Stop Declaration Statement1 Statement2 ... int i; i = 1; ; int i; int j = i; int i = j; int j; "