• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

A flaw in the default access

 
VIGNESHWAR VISWANATHAN
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Jeremy Botha
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It may be the cynic in me, but that question looks like it was typed verbatim from a homework or exam assignment.

J
 
Gavin Tranter
Ranch Hand
Posts: 333
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use a more recent version of the JDK
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic