Java also has good error handling features which we will not consider further here. This is very useful for applications involving GUIs as for example it allows the simulation part of the program to run 'almost' simultaneously with the processing of mouse clicks or scrolling operations. On true multiprocessor boxes it allows these different tasks to be farmed out to independent processors. Introduction to OOP Object Oriented Programming OOP is quite different from procedural programming as exemplified by C or Fortran. In OOP code is built not out of functions but out of objects .
Objects are idealizations of real world objects.
For example, we might want to write a program concerned with the properties of fruit. Java allows us to define a new type of variable - Fruit and inside this variable we can package the two pieces of data relevant to our ideal fruit object. This is an attempt to keep data and the functions that act on it in one place. Functions are called methods in Java. This is a special constructor method which is used to initialize this instance of the Fruit class.