block | | | | | | Statements and Expressions | { a =5; b = computeSomething; } | | | to create a new scope and/or to create a compound statement | the body of classes, loops, conditional statements and for exception handling | A syntactic unit that groups statements or makes new declarations | | body, nested block | | several statements surrounded by braces | style preferred by the authors:if(condition) { // statements } | |
package | put a class in it or put an interface in it by putting a package statement at the top of the source file in which the class or interface is defined | a name space | a name | imported | a set of class files in a directory | Packages | | classes or interfaces by function | using the import statement | to group together related classes into a subsystem | | A collection of related classes and interfaces that provides access protection and namespace management | use the import statement with the asterisk wildcard character | | a file that begins with a package statement | 0 or more classes and 0 or more interfaces | | package name |