door Eduard Ferney Cruz Ospina 3 jaren geleden
247
Meer zoals dit
Memory allocation
Exception handling
Garbage collection
Early error detection
Object oriented programming is a way of organizing programs as collection of objects, each of which represents an instance of a class. 4 main concepts of Object Oriented programming are:
Inheritance
Apoya el concepto de clasificación jerárquica.
La herencia es el mecanismo por el cual un objeto adquiere las propiedades algunas / todas de otro objeto.
Polymorphism
This can be implemented by designing a generic interface, which provides generic methods for a certain class of action and there can be multiple classes, which provides the implementation of these generic methods.
In other words it means, one method with multiple implementation, for a certain class of action. And which implementation to be used is decided at runtime depending upon the situation (i.e., data type of the object)
Polymorphism means to process objects differently based on their data type.
Encapsulation
Encapsulation is: - Binding the data with the code that manipulates it. - It keeps the data and the code safe from external interference.
Everyone knows how to access it.
The idea of encapsulation is to keep classes separated and prevent them from having tightly coupled with each other.
There shouldn’t any side effects of the code, to the rest of the application.
Can be easily used regardless of implementation details.
Abstraction
Abstraction is a process where you show only “relevant” data and “hide” unnecessary details of an object from the user.
is a development toolkit that allows you to create, compile and run java programs.
This java virtual machine allows to run the same code on different operating systems
The java compiler compiles the source code to bytecode.