Easy learning with example program codes

What is object in java?

Object in Real world:

A real world entity. Every real world object/entity has two characteristics state and behavior.  Let us take the example of a car. Its state is defined by color, current speed etc and behavior is defined by changing speed, applying breaks etc.

Object in programming:

Like every real world object, software objects also have state and behavior.  State of the object is represented by data members or fields and behavior is represented by methods.
object and class

Copyright © 2018 CodesJava Protection Status SiteMap