Understanding
programming languages

Dr Andy Evans

[Fullscreen]

Java

  • Brief History of Java
  • How does Java work?

A brief history of
programming

  • 1930's Alan Turing first thought about programmable machines that had flexible uses.
  • 1940's First properly flexible computers - programmed in binary 'First Generation Languages', for example '010110100110'.
  • Early 1950's 'Second Generation Languages' - used simple codes to represent operations, like '02A02' for '2 add 2'.

Converting code to binary

  • A compiler is used to convert human language code into binary code once. The binary code can then be run as many times as you like.
  • An interpreter runs the source code directly, usually using its own binary code to complete the tasks asked for.

A brief history of
programming cont...

  • Mid 1950's Third generation languages: in a human readable form, e.g. '2 add 2'.
  • Fourth generation languages try to let people describe what they want to do, without complicating things with how they're done.
  • Java is a Third generation 'Object Orientated Language'.

Object Orientated
Languages

  • At first programs were written so all the information about what to do was held in one file, and all the data in another.
  • Fast became a nightmare.
  • Object Orientated Languages build bits of code called 'Objects' which can hold data and do specific things with it.
  • Once they're done, they pass the data on to another Object. Each Object has its own text file associated with it.

Example


Menu fileMenu = new Menu ("File");
MenuItem saveWeb = 
		new MenuItem ("Save as Web Page...");
fileMenu.add(saveWeb);
MenuListener a = new MenuListener(saveWeb);

Brief History of Java

  • Java was first released in 1995 as a platform independent and 'nicer' version of C++.
  • Java 1.1 was released early 1997: Faster. Database access. Networking improved.
  • Java 1.2 or "Java 2": Slightly fancier.
  • Java 1.5 / "Java 5" (now 1.7 or "Java 7"): A few additional bits you can turn on.
  • Java was built by Sun, but they were bought by Oracle.

Next

How to be a programmer