Sunday 17 July 2016

Java statements - Control statements

The statements in java are like sentences in natural language. A statement is an executable combination of tokens ending with semicolon (;) mark. Statements are usually executed in sequence in the order in which they appear. However, it is possible to control the flow of execution, if necessary, using special statements. Java supports the following type of statements.

  1. Empty statements 
  2. Expression statements 
  3. Labelled statements 
  4. Control statements 
  5. Synchronized statements
  6. Guarding statements    

Empty statements :- These no nothing and are used during programming development as a place holder.

Expression statements : Most statements are expression statements. Java has several types of expression statements like assignment, per-increment / Decrements  ext..

Labelled statements: Any statement may being with a label. Such label must not be a keywords, already declared local variables or previous used labels in this module.

Control statements: Control statements are three types selection, iteration, and jump statements.

Synchronized statements: These are used handling issues with multi threading.

Guarding statements : These are used for safe handling of code that may cause exceptions. These statements use the keywords try, catch, and finally.

0 comments :

Post a Comment

Note: only a member of this blog may post a comment.

Machine Learning

More

Advertisement

Java Tutorial

More

UGC NET CS TUTORIAL

MFCS
COA
PL-CG
DBMS
OPERATING SYSTEM
SOFTWARE ENG
DSA
TOC-CD
ARTIFICIAL INT

C Programming

More

Python Tutorial

More

Data Structures

More

computer Organization

More
Top