- 1、本文档共10页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 5、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 6、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 7、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 8、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
java的面向对象基础教程(Java object oriented basic course).doc
java的面向对象基础教程(Java object oriented basic course)
Object oriented Day02
2012/4/1
====================
OO
Class reference object
constructor
Method
1 object oriented (OO)
1) what is Object (object), Object meaning: something, refers to an instance of specific things
2) object oriented, oriented to the relationship between objective things
4) OOA object oriented analysis /OOD object oriented design
Here comes the guest (someone who comes to a guest type)
5) object oriented concepts
A type: noun concepts, such as guests, dishes, chefs
B reference (variable): pronouns that refer to specific conceptual instances, such as someone, specials
C object (object): an individual instance of a specific concept, such as Zhang Sanfeng, the man, a plate of chicken
D behavior (method)
E polymorphism: behavior / reference, which changes in specific situations
A lamp: polymorphic
Play: change according to object
F encapsulation: any object instance is encapsulated as possible to reduce exposure
E inheritance: the inheritance relation of concepts
2 Java types, reference variables and heap objects
1) Java class, which is used to describe the types of things, such as books
The concept of library management system: Book Book
The book features: ISBN, title, number, author, price...
Class = type
2) statement of class:
Public class Book{
Long id;
String name;
String ISBN; / / ISBN
String[] authors; / / Author
Double price;
}
3) reference variables and object creation process:
Memory management and allocation in A Java:
Stack is a Java using memory area, the way it is used: LIFO (later residence)
Heap is also a memory area for Java, which does not need to be allocated randomly
B local variables and heap object spatial allocation
Java local variables are allocated in the stack, which is assigned according to the type of variables
Objects are allocated in a heap, and space is allocated according to class properties (instance variables)
C variable types and allocation
Variables are divided into ba
您可能关注的文档
- 二年级小学生家长评语大全.doc
- 临床护士职业倦怠与工作能力及离职意愿关联性的研究(可编辑).doc
- 小学生通知书家长评语范文.doc
- 中法基础强化阶段杨帆法制史讲义.doc
- 选修明治维新教案.doc
- 求多项式之和(Finding the sum of polynomials).doc
- 七年级下册数学第六章自主学习导学案-实数.docx
- ..整数指数幂(二)教案.doc
- 我国股市行业时变β系数研究.doc
- Kafka数据可靠性深度解读.doc
- 小学数学试卷一年级上册期中测试卷【综合题】.docx
- 2024-2025学年京改版数学9年级上册期末测试卷及答案详解(历年真题).docx
- 小学数学试卷一年级上册数学期末测试卷附完整答案(名师系列).docx
- 小学数学试卷一年级上册数学期末测试卷附完整答案(历年真题).docx
- 小学数学试卷一年级上册数学期末测试卷附完整答案(各地真题).docx
- 北京师范大学珠海分校《Java开发框架》2022-2023学年第一学期期末试卷.doc
- 小学数学试卷一年级上册数学期末测试卷附完整答案(典优).docx
- 小学数学试卷一年级上册数学期末测试卷附完整答案(夺冠).docx
- 小学数学试卷一年级上册期中测试卷【实用】.docx
- 小学数学试卷一年级上册数学期末测试卷附完整答案【名校卷】.docx
文档评论(0)