Java 应用与开发 - 面向对象编程进阶# Java 应用与开发 面向对象编程进阶 PART2 王晓东 wangxiaodong@ouc.edu.cn 中国海洋大学 September 30, 2018  多种不同类型的对象——既可以引用其声明类型的对象,也可以引用其声明类型的子类的对象。 Person p = new Student(); //Student jpg) ## 什么是多态? 在 Java 中,子类的对象可以替代父类的对象使用称为多态。 ## Java 引用变量与所引用对象间的类型匹配关系 一个对象只能属于一种确定的数据类型,该类型自对象创建直至销毁不能改变。 一个引用类型变量可能引用(指向)多种不同类型的对象——既可以引用其声明类型的对象,也可以引用其声明类型的子类的对象。  是面向对象编程的核心机制之一,其本质是 在已有类型基础之上进行扩充或改造,得到新的数据类型,以满 足新的需要。 根据需要定义 Java 类描述“人”和“学生”1 CODE ”Class Person public 一个类的方法中使用到另一个类的对象 (uses-a) !。 聚合关系 一个类的对象包含〈通过属性引用) 了另一个类的 对象 (has-a) >。 泛化关系 一般化关系 〈is-a),表示类之间的继承关系、类和 接口之间的实现关系以及接口之间的继承关系。 开[ :车能够装载货物,车的装载功能 (load() 方法) 对货物 (goods) 有依赖。 。 2车有发动机、车轮等,Car 对象是由 Engine0 码力 | 39 页 | 614.13 KB | 2 年前3
Java 对象的创建过程 ## 链滴 ## Java 对象的创建过程 作者:vcjmhg 原文链接:https://ld246.com/article/1619614850780 来源网站:链滴 许可协议:署名-相同方式共享4.0国际(CC BY-SA 4 p2_1.jpg) ## 概述 在之前的一篇文章《关于Java继承的哪些事》简单讲了Java创建对象的过程,但具体细节当时并没有细讲。因而本篇文章以HotSpot虚拟机为例,来讲一下Java虚拟机是如何创建一个对象的? 简单来说Java对象的创建过程总共分为5步: ## Java创建对象的过程 ## 类加载检查 首先当虚拟机遇到一个new指令时,首先会去检查这个参数能否在常量池中定位 表的的类是否已经被加载、连接、解析和初始化过,如果没有需要先执行的加载操作(详细过程可参考"类的加载流程")。 ## 分配内存 当类加载检查通过后,接下来虚拟机需要为新生对象分配内存,为对象分配空间的任务等同于把一块定大小的内存从 Java 堆中划分出来。分配内存的方式主要有两种:指针碰撞和空闲列表。 具体选择哪种方式取决于Java堆是否规整。而Java堆是否规整取决于垃圾收0 码力 | 4 页 | 389.87 KB | 2 年前3
Ozone:Hadoop 原生分布式对象存储# Ozone : Hadoop 原生分布式对象存储 Hadoop 社区推出了新一代分布式Key-value对象存储系统 Ozone,同时提供对象和文件访问的接口,从构架上解决了长久以来困扰HDFS的小文件问题。本文作为Ozone系列文章的第一篇,抛个砖,介绍Ozone的产生背景,主要架构和功能。 S3 protocol 。通过 OzoneFS,Hive,Spark 等应用不需要做任何修改,就可以运行在 Ozone 上。Ozone 同时支持 Data0 码力 | 10 页 | 1.24 MB | 1 年前3
Celery 3.1 Documentation# Celery Documentation Release 3.1.25 Ask Solem Contributors Nov 12, 2017 Powered by TCPDF (www.tcpdf.org) ## Contents 1 Getting Started 3 2 Contents 5 3 Indices and tables 561 Bibliography 563 563 Python Module Index 565 Celery is a simple, flexible and reliable distributed system to process vast amounts of messages, while providing operations with the tools required to maintain such a system while also supporting task scheduling. Celery has a large and diverse community of users and contributors, you should come join us on IRC or our mailing-list. Celery is Open Source and licensed under the0 码力 | 607 页 | 2.27 MB | 2 年前3
Celery 3.0 DocumentationThis document describes the current stable version of Celery (4.0). For development docs, go here. ## Celery - Distributed Task Queue Celery is a simple, flexible, and reliable distributed system to while also supporting task scheduling. Celery has a large and diverse community of users and contributors, you should come join us on IRC or our mailing-list. Celery is Open Source and licensed under the you're new to Celery you can get started by following the First Steps with Celery tutorial. - You can also check out the FAQ. ## Contents - Copyright - Getting Started o Introduction to Celery Brokers0 码力 | 2110 页 | 2.23 MB | 2 年前3
Celery 4.4.0 DocumentationThis document describes the current stable version of Celery (4.4). For development docs, go here. ## Celery - Distributed Task Queue Celery is a simple, flexible, and reliable distributed system to while also supporting task scheduling. Celery has a large and diverse community of users and contributors, you should come join us on IRC or our mailing-list. Celery is Open Source and licensed under the using Celery to create a commercial product, please consider becoming our backer [https://opencollective.com/celery#backer] or our sponsor [https://opencollective.com/celery#sponsor] to ensure Celery’s future0 码力 | 1185 页 | 1.42 MB | 2 年前3
Celery 1.0 Documentation## Celery - Distributed Task Queue Contents: • Getting Started • Introduction • Broker Installation • First steps with Celery • First steps with Django • Periodic Tasks External tutorials and resources • Using Celery with Redis/Database as the messaging queue. • Tutorial: Creating a click counter using carrot and celery. • Frequently Asked Questions • General Task Decorators - celery.decorators Defining Tasks - celery.task.base Executing Tasks - celery.execute Task Result - celery.result Task Information and Utilities - celery.task Configuration0 码力 | 221 页 | 283.64 KB | 2 年前3
Celery 3.0 Documentation Celery Documentation Release 4.0.0 Ask Solem contributors Nov 29, 2016 Powered by TCPDF (www.tcpdf.org) 1 Getting Started Started 3 2 Contents 5 3 Indices and tables 649 Bibliography 651 Python Module Index 653 Celery is a simple, flexible, and reliable distributed system to process vast amounts of messages, while while also supporting task scheduling. Celery has a large and diverse community of users and contributors, you should come join us on IRC or our mailing-list. Celery is Open Source and licensed under the0 码力 | 703 页 | 2.60 MB | 2 年前3
Celery 4.4.2 Documentation Celery Documentation Release 4.4.2 Ask Solem contributors Mar 17, 2020 Powered by TCPDF (www.tcpdf.org) ## Contents 3 Contents 7 4 Indices and tables 733 Bibliography 735 Python Module Index 737 Index 739 Celery is a simple, flexible, and reliable distributed system to process vast amounts of messages, while while also supporting task scheduling. Celery has a large and diverse community of users and contributors, you should come join us on IRC or our mailing-list. Celery is Open Source and licensed under the0 码力 | 797 页 | 2.85 MB | 2 年前3
共 1000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 100













