Objects in Java

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.

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • RSS

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 
As long as a computer has a Java VM (Virtual Machine), a Java program can run on these machines,
  • Windows 2000 
  • Linux 
  • Solaris 
  • MacOS 
The Java platform differs from most other platforms in that it's a software-only platform that runs on top of other hardware-based platforms. The Java platform has two components,
  • The Java Virtual Machine (Java VM) -
compiles and translates Java scripts into Java bytecodes which can be descibed as machine code instructions.


  •  The Java Application Programming Interface (Java API) -
 is a large collection of ready-made software components that provide many useful capabilities, such as graphical user interface (GUI) widgets. The Java API is grouped into libraries of related classes and interfaces; these libraries are known as packages.

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • RSS