正在加载图片...
上海交通大学交大密西根 联合学院·一 ◆ 81T UM-SJTU Joint Institute University of Michigan Shanghal Jiao Tong University Constructors When we define regular variables,we can define it without initialization or define it and get it initialized at the same time. We wish the classes we defined has the same property.It is therefore,we normally define two kinds of constructors Constructor with no specified initial values Constructor with specified initial valuesConstructors Constructors • When we define regular variables, we can define it without initialization or define it and get it initialized at the same time. • We wish the classes we defined has the same property. It is therefore, we normally define two kinds of constructors – Constructor with no specified initial values – Constructor with specified initial values
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有