正在加载图片...
Creating an array of person objects -3 Code Person[ personi One Person object is person new Person [20] created and the reference to this object is placed in person [o] = new Person( )i position O oerson 01234 16171819 State of Person Memory After(C) is executed C 2000 McGraw-Hill troduction to Object-Oriented Programming with Java--Wu Chapter 9-14© 2000 McGraw-Hill Introduction to Object-Oriented Programming with Java--Wu Chapter 9 - 14 Creating an Array of Person Objects - 3 Code State of Memory Person[ ] person; person = new Person[20]; C person[0] = new Person( ); One Personobject is created and the reference to this object is placed in position 0. 0 1 2 3 4 16 17 18 19 person 0 1 2 3 4 16 17 18 19 person After is executed C Person
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有