Let us now look deep into what are objects. If we consider the
real-world we can find many objects around us, Cars, Dogs, Humans etc.
All these objects have a state and behavior.
If we consider a dog then its state is . name, breed, color, and the behavior is . barking, wagging, running
If you compare the software object with a real world object, they have very similar characteristics.
Software objects also have a state and behavior. A software object's
state is stored in fields and behavior is shown via methods.
So in software development methods operate on the internal state of
an object and the object-to-object communication is done via methods.
Objects in Java
What is Java?
Java is a computer programming language created by Sun Microsystems. Java is used mainly on the Internet and uses a virtual machine which has been implemented in most browsers to translate Java into a specific application on different computer system. With most programming languages, you either compile or interpret a program so that you can run it on your computer.
The Java programming language is unusual in that a program is both compiled and interpreted. The most common Java programs are applications and applets. Applications are standalone programs, such as the HotJava browser. Applets are similar to applications, but they don't run standalone. Instead, applets adhere to a set of conventions that lets them run within a Java-compatible browser.
The Java programming language is a high-level language that can be described as,
- Architecture neutral
- Object oriented
- Portable
- Distributed
- High performance
- Multithreaded
- Dynamic
- Secure
- Windows 2000
- Linux
- Solaris
- MacOS
- The Java Virtual Machine (Java VM) -
- The Java Application Programming Interface (Java API) -