Loading

Understand Objects, Understand Java




Java is an object oriented programming language developed by Sun Microsystems in the early 1990s. Here are the 5 strengths of Java.

  1. uses object oriented programming methodology
  2. allows the same program to be executed in different operating systems
  3. contains built in support for using computer networks
  4. designed to execute code from remote resources securely
  5. easy to use by selecting good parts of other object oriented languages

Java is an interesting programming language that I’ve learned to use when I was in university. I guess I liked it cause my lecturer was a professor from German. His extradordinary ability to explain the most complex language into super simple daily examples is a wonder. Thanks to him, I can now explain Java in very simple terms.

lamp

Let’s look at the world around us. I’ll take my place as an example. I am now in my room and there’s a lamp above the monitor. There are 2 states where it can be, which is on and off. There are also 2 behaviours, the process of turning on and turning off. Let’s take a while and look around. Seek answers to these 2 questions :

  • What states can the object be in?
  • What behvaious can the object be in?

light on

Once you’ve understood real world objects, you’ll understand software objects. They are exactly the same. Software objects stores its state in fields and exposes its behaviours in methods. Usually the stored states are hidden. Why? Because it will control how the object is being used. I know that I can’t control the brightness of my lamp. There is no way to do it and attempting to do it will only end up in rejection. We just need to know what we need to do (press the switch to on or off), which is why the switch (methods) is exposed.

switch

There you have it. Basics of Java in very simple terms. =)

Java technology
Source for java development


      Pin It



Leave a Reply

Your email address will not be published. Required fields are marked *


8 + = twelve

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>