Linux Today: Linux News On Internet Time.
Search Linux Today
search.internet.com
Linux News Sections:  Blog -  Developer -  High Performance -  Infrastructure -  IT Management -  Security -  Storage -
Linux Today Navigation
LT Home
Preferences
Contribute
Link to Us
Search
Linux Jobs

Become a Marketplace Partner

internet.commerce
Be a Commerce Partner














The Linux Channel at internet.com
Linux Today
Enterprise Linux Today
Apache Today
JustLinux.com
Linux Planet
PHPBuilder
All Linux Devices
Technology Jobs

JustTechJobs.com

LinuxToday Newsletters
Subscribe News
Subscribe PR
Subscribe Security

internet.com
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

 






Current Newswire:

Installing Ubuntu 9.10

Hands-on: OpenMoko WikiReader is simple, appealing

Perl far from dead, more popular than you think

Microsoft Exchange alternatives

Kubuntu 9.10: A Mixed Bag

Could Microsoft switch to Linux?

Red Hat Virtualization Manager for Windows Only?

Creating Ebooks with Sigil

Editor's Note: Making Multi-Channel Firewire Music With Linux

Amaya: A Simple, Yet Useful Alternative to Dreamweaver




Server Support Specialist I
The Computer Merchant, Ltd
US-OK-Oklahoma City

Justtechjobs.com Post A Job | Post A Resume
:The Busy Java developer's Guide to Scala: Packages and Access Modifiers
The Busy Java developer's Guide to Scala: Packages and Access Modifiers
Aug 6, 2008, 06 :00 UTC (0 Talkback[s]) (2817 reads)

(Other stories by Ted Neward)

[ Thanks to BlueVoodoo for this link. ]

"While packaging (and importing) are part of the encapsulation and packaging story in Scala, a large part of it, as with Java code, lies in its ability to restrict access to certain members in a selective way — in other words, in Scala's ability to mark certain members "public," "private," or somewhere in-between.

The Java language has four levels of access: public, private, protected, and package-level access (frustratingly applied by leaving out any keyword). Scala:

* Does away with package-level qualification (in a way)
* Uses "public" by default
* Specifies "private" to mean "accessible only to this scope"

"By contrast, "protected" is definitely different from its counterpart in Java code; where a Java protected member is accessible to both subclasses and the package in which the member is defined, Scala chooses to grant access only to subclasses. This means that Scala's version of protected is more restrictive (although arguably more intuitively so) than the Java version."

Complete Story

Related Stories:
The 'Anti-Java' Professor and the Jobless Programmers(Aug 04, 2008)
Give Apache Geronimo a Lift(Jul 30, 2008)
Deal With XML Parsing Errors in Java APIs(Jul 30, 2008)
Testing a HELP System in a Java Application(Jul 29, 2008)



No talkbacks posted.
  Home | Search Talkbacks | Customize View    Top of Page  



Enter your comments below:

* Your Name:

* Your Email Address:

* Subject:

CC: [will also send this talkback to an E-Mail address]

* Comments:

Tags allowed:<I>,<B> and <U>. See our talkback-policy for more about talkback content.

Fields marked with * are required!






..............................




All times are recorded in UTC.
Linux is a trademark of Linus Torvalds.
Powered by Linux, Apache and PHP

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs