why java can be object oriented programming?
because java had this following:
- Abstract Class
- Object
- Encapsulation
- Inheritance
- Polymorphism
Abstract Class is look some object more simple. which the object had small module that general with the other object.
example: Class CAR , CAR is the class that have module-module like move forward , move backward , turn left dan turn right for the example. every car had that action but maybe one car with the other car had a special action, but in this case CAR can be call Abstract class.
Object is consist of :
- State/ properties / field
- Behaviour / method
for the example : human. --> edward , darren
the state is age, name , weight
the behaviour is eat , drink , be old
Encapsulation is like protect the internal system , that common user doesn't no actually the inside of the system.
example : a save button, we don't know what action or what code is embed in that button. but we just know that if we press that button it will be save the file.
Inheritance is structure hierarchy of objects based on the class. or a process when a class had been inherit with a other class where the inheritance class had some characteristic for that class
example : class mom and father, the inheritance class is son
Polymorphism is the same interface that can enable be use for execute some object to do a action that maybe for the principal it same but the process can be different.
example : car drive system
Java is a freeware that can be run in any platform, so make easy to get java web hosting, java jsp hosting, get more about java tutorial in the internet and actually to be freelance java programmer it more fun, more easy, more income :P