正在加载图片...
Object Deletion- Approach 1 int delIdx 1 A person (de lld]=null Delete Person B by setting the reference in osition 1 to null person person 0123 0 23 A A C Before (A) is executed After (A) is executed C 2000 McGraw-Hill Introduction to Object-Oriented Programming with Java--Wu Chapter 9-18© 2000 McGraw-Hill Introduction to Object-Oriented Programming with Java--Wu Chapter 9 - 18 Object Deletion – Approach 1 int delIdx = 1; person[delIdx] = null Delete Person B by setting the reference in position 1 to null. 0 1 2 3 person A B C D A 0 1 2 3 person A C D Before is executed A After is executed A
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有