answersLogoWhite

0


Best Answer

Control flow mechanisms in Java include: if-else statements Example: if (a == b) System.out.println("They are equal."); else System.out.println("They are different."); endif (Here, and in the following examples, the single command can be replaced by a block in curly braces.) switch statementsExample: switch (number) { case 1: System.out.println("One"); break; case 2: System.out.println("Two"); break; case 3: System.out.println("Three"); break; default: System.out.println("Some other number"); break; loops (for, do, while): For loops, example: for(int i = 1; i

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is used to control flow of the Java program?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the use of thread in java?

Thread is a single sequential flow of control within program. Each flow of control may be thought of as a seperate lines of code(module) is called as thread.Actually thread is a predefined class in java. threads are used to handle Exceptions in java.


What does the term control flow refer to?

Control flow refers to the order in which instructions or statements of an imperative program are executed. This term is widely used in computer science.


When is Iteration used in a Java program?

in a loop


Differences between Java Applet and Java Beans?

Java applet is a program used to run java applications while beans is a compiler used to design java programs (IDE, GUI) :-) GilbertC


What is the Java grammar?

"Java grammar" is the way of writing a program with correct syntax of various commands used in java language.


What is case in java?

Case is used to label each branch in the switch statement in Java Program


What are the similarities between if else and switch case?

If else and switch case both are used to control the flow of program.


Why main is used in java?

In java need main() method. without main() in java we won't run the java programe main() signals the entry point to the program - it tells the Java Virtual Machine which is the first program that should be executed.


What is a java programming?

A java program is a program that is coded and run in the programming language called java. Java is similar to c++ in structure, and is more common in web apps. C++ is the equivalent for more heavy duty programs such as most software used to compose a java program.


How java is 100 percent Internet based?

It isn't. It can also be used to write desktop applications. Java does have many options to program for the Internet, but that is not the only possibility.It isn't. It can also be used to write desktop applications. Java does have many options to program for the Internet, but that is not the only possibility.It isn't. It can also be used to write desktop applications. Java does have many options to program for the Internet, but that is not the only possibility.It isn't. It can also be used to write desktop applications. Java does have many options to program for the Internet, but that is not the only possibility.


What is api classification used for?

A control structure is a block of programming that analyzes variables and chooses a direction in which to go based on given parameters. The term flow control details the direction the program takes (which way program control "flows")


How do you connect java with visual studio?

Unfortunately, you can not use Visual Studio to edit Java. Visual Studio can be used to program: Visual Basic C# C++ ASP.NET Anyways to program Java you can use other programs as Eclipse for Java Developers