A Blog about: Software Architecture, Software Engineering, Programming Paradigms, Android Mobile Apps Development and Agile Software Development.
Tuesday, July 29, 2008
The busy Java developer's guide to Scala: Packages and access modifiers
Scala takes a slightly different approach in respect to packaging, treating it as a combination of the Java language's declaration approach and C#'s scoped approach. With that in mind, a Java developer can do the traditional Java approach and put a package declaration at the top of a .scala file just as normal Java classes do; the package declaration applies across the entire file scope just as it does in Java code. Alternatively, a Scala developer can use Scala's package 'scoping' approach in which curly braces delimit the scope of the package statement. The busy Java developer's guide to Scala: Packages and access modifiers
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment