Background - Introduction to Programming in Java - Lecture Slides, Slides of Java Programming

In this course, Introduction to Programming in Java, we learned all programming concepts and implement them in java. Key points in these lecture slides are: Background, Objectives, Non-Technical Overview, Java, Java'S Advantages, Java'S Disadvantages, Some History, Types of Java Code, Java Safety, Core Libraries

Typology: Slides

2012/2013

Uploaded on 04/22/2013

sathaye
sathaye 🇮🇳

4.8

(8)

102 documents

1 / 49

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Objectives
give a non-technical overview of Java
1. Background
Docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31

Partial preview of the text

Download Background - Introduction to Programming in Java - Lecture Slides and more Slides Java Programming in PDF only on Docsity!

  • Objectives
    • give a non-technical overview of Java

1. Background

Docsity.com

Contents

  1. Java, etc.
  2. Java's Advantages
  3. Java's Disadvantages
  4. Some History
  5. Types of Java Code
  6. Java Safety
  7. Core Libraries
  8. Notes on Java Installation

Docsity.com

Other Javas (e.g. OpenJDK)

  • I'll be using the Java developed by Oracle

(initially by Sun).

  • There are other implementations of Java, the

most important being OpenJDK

  • popular on Linux
  • It's easier for non-Oracle people to add

features to OpenJDK.

Docsity.com

2. Java’s Advantages

  • Productivity
    • object orientation
    • many standard libraries (packages)
  • Simpler/safer than C, C++
    • no pointer arithmetic, has automatic garbage collection, has array bounds checking, etc.

continued Docsity.com

  • Network support
    • communication with other machines/apps
    • variety and standards:
      • sockets, RMI, IPv
    • security, resource protection
  • Multithreading / concurrency
    • can run several ‘threads’ at once
    • extensive concurrency libraries

continued Docsity.com

  • Portablility / Platform Independence
    • “write once; run anywhere”
    • only one set of libraries to learn
  • Supports native code
    • can integrate legacy (old) C/C++ code
  • JDK is free

continued Docsity.com

Some Java Statistics (May 2012)

Docsity.com

3. Java’s Disadvantages

  • Java/JDK is still being developed
    • many changes between versions
  • Sun has not guaranteed backward

compatibility of future versions of Java.

  • at the moment, when old-style code is compiled, the compiler gives a “deprecation” warning , but will still accept it

continued Docsity.com

  • Cross-platform testing and debugging has

been a problem (due to inconsistencies)

  • most major problems have been fixed
  • “Write once; run anywhere” means that

some local OS features weren't supported:

  • e.g. right button actions under Windows
  • no joysticks, special keypads
  • this is fixed in the latest versions of Java

continued Docsity.com

  • Java’s security restrictions makes some

code hard to write:

  • cannot “see” much of a local machine
  • newer JDK versions make this easier
  • The existing code base (in C, VB, etc.)

means that people do not want to rewrite

applications in Java.

continued Docsity.com

  • Slow Internet connections
    • makes it difficult (and irritating) to download medium/large size applets
    • e.g. flash files have replaced Java animations
  • Lots to learn
    • Java language (small) and Java libraries (very, very large)

continued Docsity.com

  • There seem to be few ‘serious’ Java

applications. But ...

  • the Java compiler (javac) is written in Java
  • most custom Java applications are internal to a company - they don’t have the high profile of major vendor software

Docsity.com

  • August 1993: the project was cancelled

after two commercial deals fell through.

  • The Web became popular during 1993.
  • July 1994: Sun restarted work on Java as a

Web programming language

  • Java contains networking features, platform portability, and a small runtime system

continued Docsity.com

  • Java released May 1995
    • Netscape supported Java in Navigator 2.0, which gave it an enormous boost
  • May 1996: JDK 1.0 released
    • hurried library development; mistakes made
  • February 1997: JDK 1.1 released
    • major changes in the event model used by the GUI; inner classes introduced continued Docsity.com