/* related posts with thumb nails */

Java statements.:

A statement is an executable combination of tokens ending with a semicolon (;) mark. Statements are usually executed in sequential order. However, it is possible to control the flow of execution, if necessary, using special statements. Java implements several types of statements as illustrated in the following Table.

Empty Statement

These do nothing and are used during program development as a place holder.

Labeled Statement

Any Statement may begin with a label. Such labels must not be keywords, already declared local variables or previously used labels in this module. Labels in Java are used as the arguments of Jump statements.

Expression Statement

Most statements are expression statements. Java has seven types of Expression statements Assignment, Pre-Increment, Pre-Decrement, Post-Increment, Post-Decrement, Method Call and Allocation Expression.

Selection Statement

These select one of several control flows. There are three types of selection statements in Java if, if-else, and switch.

Iteration Statement

These specify how and when looping will take place. There are three types of iteration statements; while, do and for.

Jump Statement

Jump Statements pass control to the beginning or end of the current block, or to a labeled statement. Such labels must be in the same block, and continue labels must be on an iteration statement. The four types of Jump statement are break, continue, return and throw.

Synchronization Statement

These are used for handling issues with multithreading.

Guarding Statement

Guarding statements are used for safe handling of code that may cause exceptions (such as division by zero). These statements use the keywords try, catch, and finally.

Related Topics:

2 comments:

William Jessie said...

This information is meaningful and magnificent which you have shared here about the financial statements preparation services. I am impressed by the details that you have shared in this post and It reveals how nicely you understand this subject. I would like to thanks for sharing this article here.financial statements preparation services in KSA

Cracking the coding interview said...

Java is running on a billion devices and is the most widely used programming language. This blog covers several parts of Java development very well. Learning fundamental, core Java, algorithms is necessary for cracking the coding interview. Great blog.

Post a Comment