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 | 2 年前3
Celery 2.2 Documentation# Celery Documentation Release 2.2.10 Ask Solem Contributors February 04, 2014 Powered by TCPDF (www.tcpdf.org) 1 Getting Started 3 1.1 Introduction 3 1.2 Broker Installation 6 1.3 First steps steps with Celery 8 1.4 Resources 10 2 User Guide 13 2.1 Overview 13 2.2 Tasks 15 2.3 Executing Tasks 29 2.4 Workers Guide 33 2.5 Periodic Tasks 39 2.6 Sets of tasks, Subtasks and Calls Tutorials 103 7.1 Using Celery with Redis/Database as the messaging queue 103 7.2 Debugging Tasks Remotely (using pdb) 105 7.3 Tutorial: Creating a click counter using Kombu and celery 106 8 Frequently0 码力 | 314 页 | 1.26 MB | 2 年前3
Celery 2.0 Documentation# Celery Documentation Release 2.0.3 (stable) Ask Solem February 04, 2014 Powered by TCPDF (www.tcpdf.org) Contents: ### Release 2.0 Date February 04, 2014 ### 1.1 Introduction Version 2.0.3 Web http://pypi.python.org/pypi/celery/ Source http://github.com/ask/celery/ Keywords task queue, job queue, asynchronous, rabbitmq, amqp, redis, python, webhooks, queue, distributed Celery is an open source asynchronous asynchronously (in the background) or synchronously (wait until ready). Celery is already used in production to process millions of tasks a day. Celery is written in Python, but the protocol can be implemented in0 码力 | 165 页 | 492.43 KB | 2 年前3
Celery 4.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 Introduction to Celery. o Brokers0 码力 | 1042 页 | 1.37 MB | 2 年前3
Celery 3.1 DocumentationThis document describes the current stable version of Celery (3.1). For development docs, go here. ## Celery - Distributed Task Queue Celery is a simple, flexible and reliable distributed system to process 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 are 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 Introduction to Celery. o Brokers0 码力 | 887 页 | 1.22 MB | 2 年前3
Celery 4.4.0 Documentation Celery Documentation Release 4.4.0 Ask Solem contributors Dec 16, 2019 Powered by TCPDF (www.tcpdf.org) ## Contents 3 Contents 7 4 Indices and tables 731 Bibliography 733 Python Module Index 735 Index 737 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 码力 | 795 页 | 2.84 MB | 2 年前3
Celery 4.4.2 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 码力 | 1188 页 | 1.42 MB | 2 年前3
共 1000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 100













