Java   View all facts   Glossary   Help
syntactic unit > scoping unit > block > body > class body
Next bodyinterface body    Upbody    Previous bodymethod body   

class body
(class definition block)
subjectfact 
class bodycannot contain executable statements except inside blocksadded by: DS, 2001-10-19 11:36:21.0
contains declarations foradded by: DS, source: Sun Java Tutorial, modified by: JK, 2001-10-19 11:36:21.0
has definition A block that specifies the variable declarations, the methods and the constructors for the classadded by: DS, source: Sun Java Tutorial, reference: Source 2, 2001-10-19 11:36:21.0
has purpose to specify the variable declarations, methods and constructors for a classadded by: JK, source: Sun Java Tutorial, 2001-10-19 11:36:21.0
has syntax
{
class element
}
where class element can be 0 or more of: variable declarations, constructors, initialization blocks, methods
added by: DS, source: Sun Java Tutorial, 2001-10-19 11:36:21.0
is a subtopic of Classes2001-10-19 11:36:21.0
is a kind of body2001-10-19 11:36:21.0
is a synonym of class definition block2001-10-19 11:36:22.0
blockhas example
{
a =5;
b = computeSomething;
}   
2001-10-19 11:36:10.0
has layout example style preferred by Sun:
if(condition) {
// statements
}
2001-10-19 11:36:10.0
has layout example style preferred by the authors:
if(condition)
{
// statements
}
2001-10-19 11:36:10.0
is used as the body of classes, loops, conditional statements and for exception handling    2001-10-19 11:36:10.0
syntactic unithas syntax rule
bold = mandatory
italic = non-terminal
normal font = optional
2001-10-19 11:38:04.0