Java learning process-oriented and object-oriented advantages and disadvantages

  Process-oriented and object-oriented Java is difficult problems encountered in the process of learning, both now compared summarize, in order to facilitate the understanding of memory and use.

  Process for the advantages of: higher performance than an object-oriented, because of the need to instantiate the class when invoked, relatively large overhead, resource consuming; ORIENTED disadvantages: no object-oriented and easy to maintain, easy to reuse, easy to expand.

java (3)

  Object-oriented advantages: easy to maintain and reuse, easy to expand, since there are object-oriented encapsulation, inheritance, polymorphism characteristic, low coupling system can be designed to make the system more flexible and easier to maintain; object-oriented disadvantages : performance lower than the process-oriented.

  Some notable features of object-oriented programming comprising:

  Key programming that data rather than processes; program is divided into so-called target; performance characteristics of the object data structure is designed; as an operation on an object data, with data structures closer together function; the data is hidden up, do not have access to external functions; can communicate between objects by function; new data and functions can easily be added come in when needed; follow the design method from the bottom (bottom-up) in the program design process.

  Design In programming mode is a new concept, different people can mean different contents of object-oriented programming. We object-oriented programming is defined as "object-oriented programming is an approach that provides a common data and functions as a separate memory space, the data and functions can be to create a copy of a similar module when needed as a template. this programming method is called object-oriented programming. "

  Can be seen from the above definition, an object is considered to be a separate section in the computer memory, the stored data and a set of operations to access the data in this interval. Because the memory section are independent, so the object can be applied without modification a plurality of different programs.

Guess you like

Origin www.cnblogs.com/coffees/p/12331230.html