#heap class design
1 messages ยท Page 1 of 1 (latest)
if all of the add/remove logic belongs to the node class, the left and right fields can be private to that class
if you have a separate class for the heap itself, you can omit an access modifier for the fields as long as the node class is in the same package as the heap class - this will prevent access to the fields except from within the package containing your classes
thx
.close
!close