A programmer s introduction to java
1 / 15

A Programmer's Introduction to Java - PowerPoint PPT Presentation

  • Uploaded on

A Programmer's Introduction to Java. - from a S/370 user. (c) IDMS/SQL News http://www.geocities.com/idmssql. Purpose. There seems to be a wall between the ‘old’ mainframe guys and the new Javaworld The wall is artificially created using buzzwords as the building blocks

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

PowerPoint Slideshow about ' A Programmer's Introduction to Java' - melania-taurus

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
A programmer s introduction to java

A Programmer's Introduction to Java

- from a S/370 user

(c) IDMS/SQL News http://www.geocities.com/idmssql


  • There seems to be a wall between the ‘old’ mainframe guys and the new Javaworld

  • The wall is artificially created using buzzwords as the building blocks

  • Our objective is to remove this wall

  • Course will focus on where Java approach differs from our traditional programming

Java - Introduction (c)http://www.geocities.com/idmssql

Java topics
Java - Topics

  • Buzzwords and the Reality

  • Basic Data Structures in Java

  • JSDK from Sun

  • Arrays

  • OOP Basics, Classes and Methods

  • Constructor

  • File Handling -I/O- Data Streams

  • GUI - AWT and Swing Components

  • Method Overloading, Polymorphism

  • Applets

  • IDEs - Intgrated Development Environments

Java - Introduction (c)http://www.geocities.com/idmssql

What is java
What is Java?

  • “Java: A simple, object-oriented, network-savvy, interpreted, robust, secure, architecture-neutral, portable, high-performance, multithreaded, dynamic language”

    --Sun Microsystems

  • The words have been faithfully copied from the original article by James Gosling (1995)

  • Simple meant simpler than C++! Gosling never intended to compare with other platforms or languages!

Java - Introduction (c)http://www.geocities.com/idmssql

A more realistic definition
A more realistic definition:

  • A C++ like OO language that has a readable syntax and acceptable performance designed to run on several modern platforms.

  • eg: applications servers, web servers, web browser (embedded in), Mobile phones and ordinary Windows applications

Java - Introduction (c)http://www.geocities.com/idmssql

Evolution of java
Evolution of Java

  • James Gosling, Arthur Van hoff, Andy Bechtolsheim. The Original Team in Sun

  • Originally designed to work in appliances

  • Mutated to a web browser environment (client)

  • Mutated from there to server software, where it can run on many back-end server platforms without worrying about GUI compatibility problems

Java - Introduction (c)http://www.geocities.com/idmssql

Java syntax
Java Syntax

  • Language syntax itself is simple

  • Data type declarations, mathematical operations, array definitions , if-else, for loop, do-while etc are not complex

  • Easier than C++

  • Though a few idiosyncracies inherited from C++

Java - Introduction (c)http://www.geocities.com/idmssql

Sample program
Sample Program

/** Hello World in Java */

public class HelloWorld {

public static void main (String args[]) {

System.out.println("Hello S212 World!");

} // end of method main

} // end of class

Java - Introduction (c)http://www.geocities.com/idmssql




* HelloWorld.java


public class HelloWorld extends Object


public static void main(String arguments[]) // Where the program starts


System.out.println(“Hello World"); // Print out message



Class name (MUST match file name)

Main method (starting point)

Line comment

Braces ‘{}’ - start & end of class and methods

Java - Introduction (c)http://www.geocities.com/idmssql

Classes and methods
Classes and Methods

We see that Java programs are organized as

classes and methods

All Java programs start with a class definition

Classes contain one or more methods

Java - Introduction (c)http://www.geocities.com/idmssql


Javac - the compiler from Sun


Source Code



Byte Code

Java Virtual Machine

Run time

Source code is translated to an intermediate “byte code”

The byte code is run in a Java Run Time System which is normally known as JVM = Java Virtual Machine

Java - Introduction (c)http://www.geocities.com/idmssql

Jsdk development kit
JSDK – Development Kit

  • Standard Edition is free - from Sun

  • Contains compilers like

  • - Javac - compile

  • - Java - execute

  • - appletviewer – run applets

  • - Javap – dis-assembler

  • - Javadoc - created html based doc

  • - Jar – Java Archive Tool (ZIP)

  • - many smaller tools...

Java - Introduction (c)http://www.geocities.com/idmssql


  • Good

  • Unlike C, others vendors didn’t bother to make their own compilers – one is enough!

  • Easy to install and run

  • Documentation available from sun (zip format)

  • Missing : Sun failed to give a simple editor and test environment; One must go to DOS! And use an editor made by Mr Nobody!!!

Java - Introduction (c)http://www.geocities.com/idmssql

Java vs c
Java vs C

  • Java was designed for a specific purpose

  • C is a more general purpose closer-to-machine language

  • Java does not produce machine code; “interpreted” by the Java Run Time (JVM)

  • C produces executable code (*.exe) which can be run as it is

Java - Introduction (c)http://www.geocities.com/idmssql


  • Java is an Object Oriented language suitable for Web and Server based Windows applications

  • Java SDK from Sun gives you the compiler and Runtime for Java

  • It’s all about classes and methods

Java - Introduction (c)http://www.geocities.com/idmssql