Object in java

what is an object in java?

What Is an Object? (The Java™ Tutorials > Learning the Java Language > Object-Oriented Programming Concepts)

Welcome to sitepoint! I write a hot tutorial for you, You never seen before! enjoy it!

You see many objects around you. ،They have two kinds of specifications:

1- What they do,Behavior specifications
2-Apparent specifications

For example,I fall in love,I love a girl, She is honest,lovely, sweet, helper…

and Apparent specifications:

She is tall,190 cm,She has blue eyes, …

She is lovely! She is a lovely object!I am a lucky man! She is too much beautiful! Congratulation!

Let us to write a class for her:

class LovelyGirl{

      int tall=190;
      String EyeColor=" blue";

      public void honest(){
          .....
      }
}

In java, variables is used for Apparent specifications,and methods for Behavior specifications

All right,But it is only a class, You need to create object, and it is soooooo easy friend:

LovelyGirl Girl=new LovelyGirl();

I hope you understand what is an object!

If you have any other question, Please tell me friend.

and of course until now , I couldn’t find that sweet,:slight_smile: