When an object receives a message, it may change its state and behavior as part of the response. This message-passing aspect of objects translates very nicely into the needs of network programming, where transactions are carried out by the mechanism of messages. It is particularly well suited to distributed systems because objects communicate by a standard message-passing mechanism, in which the actual location of the objects becomes less important. If your object needs to talk to an object, it isn't particularly important if it is on your computer or a remote host. All that really counts is that the object gets your message.
Strings are objects, numbers are objects, threads are objects, even applets are objects.
Because of this, Java has all the helpful features of object-oriented systems just described. Its core constructs of classes, objects, methods, and instance variables are, by their very nature, managed in a modular fashion. Java's support for inheritance allows you to build new classes from other classes. Each class you construct becomes a tool that can be used to create yet more complex classes. Java ' s particular object-oriented implementation allows it to have yet even more desirable features than those already discussed.