DevPinoy.org
A Filipino Developers Community

>>> First two to make 3 wins! <<<

java's protected == .NET's protected internal
i was teaching the basics of inheritance in java to one of my math tutees when i bumped into one of the differences of java and .NET.  basically i declared a field variable as protected and was able to access the said field from a different class on the same package.  turns out that java's protected keyword is equivalent to .NET's protected internal.  haven't really used java (i also had a hard time using eclipse the first time).

Posted 08-23-2006 8:35 PM by jokiz
Filed under: , ,

Comments

lamia wrote re: java's protected == .NET's protected internal
on 08-23-2006 5:56 AM
Protected in Java lets anything within the class, package and subclass to access the element. From the Sybex Complete Java 2 Specification it states that the correct order of access modifiers from the least restrictive is public, protected, default(no modifier) and private
Mark wrote re: java's protected == .NET's protected internal
on 01-19-2007 5:16 AM

Why would you be "teaching the basics of inheritance in java" if you "haven't really used java"? lol

jokiz wrote re: java's protected == .NET's protected internal
on 01-19-2007 6:41 AM

hi mark, i'm into C# which is very close to .NET


Copyright DevPinoy 2005-2008