Chinaunix首页 | 论坛 | 博客
  • 博客访问: 194256
  • 博文数量: 69
  • 博客积分: 1400
  • 博客等级: 上尉
  • 技术积分: 720
  • 用 户 组: 普通用户
  • 注册时间: 2005-08-03 11:35
文章分类

全部博文(69)

文章存档

2011年(13)

2010年(46)

2009年(10)

我的朋友

分类: Java

2010-07-15 12:46:59

JLS100715Note on JLS, Ch14

 

@ http://zcatt.cublog.cn

 

Hist:

1007015, draft

 

 

 

Chapter 14 Blocks and Statements(语句块和语句)

Some statements contain other statements as part of their structure, such other statements are substatements of the statement. We say that statement S immediately contains statement U if there is no statement T different from S and U such that S contains T and T contains U.

 

Normal and Abrupt Completion of Statements

If all the steps are carried out as described, with no indication of abrupt completion, the statement is said to complete normally. Otherwise, complete abruptly.

 

Blocks

A block is a sequence of statements, local class declarations and local variable declaration statements within braces.

 

Local Class Declarations

A local class is a nested class that is not a member of any class and that has a name. It is a compile-time error if a local class declaration contains any one of the following access modifiers: public, protected, private, or static.

 

Statements

 

The Empty Statement

 

Labeled Statements

 

Expression Statements

 

The if Statement

 

The assert Statement

An assertion is a statement containing a boolean expression. An assertion is either enabled or disabled. If enabled, an error is reported if the expression evaluates to false. If disabled, evalutation has no effect whatsoever.

 

The switch Statement

 

The while Statement

 

The do Statement

 

The for Statement

two forms, basic and enhanced:

BasicForStatement:

for ( ForInitopt ; Expressionopt ; ForUpdateopt ) Statement

 

EnhancedForStatement:

for ( VariableModifiersopt Type Identifier: Expression) Statement

 

The break Statement

 

The continue Statement

 

The return Statement

 

The throw Statement

 

The synchronized Statement

A synchronized statement acquires a mutual-exclusion lock on behalf of the executing thread, executes a block, then release the lock.

 

The try Statement

 

Unreachable Statement

 

 

 

REF

1.       JLS 3nd

2.       JVM 2nd
Locations of visitors to this page

阅读(1315) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~