如果您实作本机介面,则方法和属性会出现在类别主体。
If you implement a local interface, methods and properties appear in the class body.
若要初始化类别,所有的静态区块和静态栏位初始设定式是以它们出现在类别主体中的顺序来执行。
To initialize the class, all the static blocks and static field initializers are executed in the order in which they appear in the class body.
此代码是一个简单的循环,遍历了一个假想的post表内的所有post,并显示post的类别和它的主体。
This code is a simple loop through all posts in a hypothetical posts table, displaying the category and the body of the post.
应用推荐