«

»

May
17

What is Class, interface, and Object in Java?

Class : is a declaration of common properties of a object’s group. It declares attributes of the objects to represent properties and methods to describe behaviors .

Interface: is a contract passed between many classes. In general, it has a name like an adjective (Serializable, Runable..). The interface, in its contract, specifies a set of methodsth be implemented by classes that engage to respect the contract. However, this is not necessary and certain classes use interface as a marker (e.g Serializable to mention that the class is ready for serialization).

Object: is a data structure valued and hidden, it answers to a set of messages. The data structure describes the status and the messages describe the behaviors. We call the data or fields describing the intern structure Attributes, and we call the set of messages the object interface. the communication is assured only trough these messages. The response to a message is called Method.

 

See also :

Share it with your freinds on Facebook Tweet it to your freinds on Twitter Myspace Friendfeed Technorati del.icio.us Digg Google Yahoo Buzz StumbleUpon

5 comments

No ping yet

  1. Chase Gilzow says:

    Awesome post! I will keep an on eye on your blog.

  2. Tonia says:

    hello!,I like your writing very much! share we communicate more about your post on AOL? I need an expert on this area to solve my problem. Maybe thats you! Looking forward to see you.

  3. Tania says:

    Hi there very cool site!! Man .. Beautiful .. Wonderful .. I’ll bookmark your website and take the feeds additionally?I’m glad to search out numerous helpful information right here in the submit, we’d like work out extra strategies on this regard, thanks for sharing. . . . . .

  4. Dorothea says:

    Hello webmaster, commenters and everyone else !!! blog was absolutely wonderful!

  5. Car repos says:

    Hey blogger, nice work with the choice of theme on this blog. It looks reall nice.

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

WP SlimStat