Linked by Hadrien Grasland on Wed 15th Jun 2011 07:32 UTC, submitted by ebasconp
Thread beginning with comment 477650
To view parent comment, click here.
To read all comments associated with this story, please click here.
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE[7]: Basically, awesome
by moondevil on Sat 18th Jun 2011 06:48
in reply to "RE[6]: Basically, awesome"
You did not understand my remark.
You can only add methods to types inside the same package the type is defined.
So if the interface is defined in package A, the type I am using is defined in package B, both I don't have access to the source code.
Now the interface changes, you cannot add the new methods to the type without modifying the package B as well. Because you are not allowed to add methods to you package B type, from package C for example.
RE[8]: Basically, awesome
by FealDorf on Sat 18th Jun 2011 13:53
in reply to "RE[7]: Basically, awesome"





Member since:
2008-01-07
No it doesn't...
I mean, I implement java's interfaces to get access to functionality. Java's interfaces (and classes that operate on these interfaces) are in a different package than my package, isn't it?