OOP (Object oriented Programmer)
Object-oriented programming language for object-oriented programming: java,c#,php,asp
Purpose : To describe any object in the real world as a Java language.
There are two important concepts in Java object-oriented programming.
1. Object. Everything is an object, a real thing created by the class.
2. Class. A description of a set of objects that have the same properties and behavior.
How Java defines the classes and the objects of the class.
public class class Name {
attributes (variables) and behaviors (methods)
}
To create the format of an object:
The class name object =null;//declares the object.
Object =new class name ();//Instantiate object. Objects are not allowed to be used if they are not instantiated. Otherwise it would be wrong to run the times.
Object calls a member of the class:
The object name. Properties;
Object name. Method (Argument)
Reference type Memory Partitioning:
1. Stack memory: The reference address is stored
2. Heap Memory: The property value of the object being stored.
Java Basic Note 6