File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes A flaw in the default access Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "A flaw in the default access" Watch "A flaw in the default access" New topic
Author

A flaw in the default access

VIGNESHWAR VISWANATHAN
Greenhorn

Joined: May 26, 2007
Posts: 17
although these package access members could be invoked only by other classes in
the same package, subclasses in different packages could override these methods and fields. In these cases, another
method in the package might call one of the overridden methods. The superclass´┐Żs behavior could be affected by the
change in the overridden method, so by overriding a package member, you could change how any method that used the
member behaved. Sun eventually decided this was a bug and fixed it in Java 1.1b3. This behavior is still present in virtual
machines based on Java 1.0

Express your views
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
I'm not sure I understand what the old behavior was like, but you know, JDK 1.0 was a long time ago, and there were a lot of bugs that were fixed going from 1.0 to 1.1. I'm not sure why this ancient problem would be interesting today.


"I'm not back." - Bill Harding, Twister
Jeremy Botha
Ranch Hand

Joined: Feb 16, 2005
Posts: 125
It may be the cynic in me, but that question looks like it was typed verbatim from a homework or exam assignment.

J


McFinnigan? Never heard of him. Nobody here but us chickens...<br /> <br />SCJP for Java 1.4<br />SCJD for Java 5.0
Gavin Tranter
Ranch Hand

Joined: Jan 01, 2007
Posts: 333
Use a more recent version of the JDK
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: A flaw in the default access
 
Similar Threads
How to override static method. Singleton is hard to subclass.
Need help with Overriding
Overriding Static Method Question
overriding
Syllabus for JCP