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.
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.
- Empty statements
- Expression statements
- Labelled statements
- Control statements
- Synchronized statements
- 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.