Java programming ideas - Chapter One (1)

Brief introduction

This is the first time to write my summary, I do not want to say too much rhetoric ambition can do just want to stick to it.

1.1 abstraction

The earliest computer languages, assembly language is a slight abstraction of the underlying machine, and the subsequent so-called imperative languages, such as C, BASIC, etc. are abstractions of assembly, mainly abstract they do is to solve the problem of computer-based structure, solve problems rather than on structural considerations, so the program is difficult to write, and the high cost of maintenance
oop object-oriented language allows to describe the problem according to the problem, rather than to describe the problem according to the computer running the solution, so this is a more powerful abstract language

Object-oriented predecessors summarized five basic characteristics:
  1. 万物皆对象:The strange object as a variable that can store data, it can also perform the operation itself, in theory, you can extract any conceptualization component (dogs, buildings, services, etc.) to solve the problem with it is represented as an object program
  2. 程序是对象的集合,它们通过发送消息来告知彼此所要做的:In fact, a call to an object method.
  3. 每个对象都有自己的由其它对象所构成的存储:You Can Create a package containing existing objects to create new types of objects, so you can build complex systems in the program, while its complexity hidden behind the simplicity of objects
  4. 每个对象都拥有其类型:Java class is actually a type of meaning, the object is a type of concrete examples
  5. 某一特定类型的所有对象都可以接收同样的消息:My understanding is similar to the characteristics inherited polymorphism

Object has state, behavior and identity. It means that each object can have internal data and methods and each object can be uniquely distinguished from other objects, specifically, is that every object has a unique address in memory

Guess you like

Origin www.cnblogs.com/chunyun/p/11790311.html