Site hosted by Angelfire.com: Build your free website today!
   JavaBook    Introduction to Java -- Author: Dr. Duanhua Tu  
skip to main content
 
JDK Docs  JDK Docs   JSP Servlet Docs  JSP Servlet Docs   Java3D Docs  Java3D Docs   Java Tutorial  Java Tutorial  
 
  Java Programming  
 

Lesson Objectives

Class Notes

How Did We Get Here?

  • In the Beginning: Assembly, FORTRAN, COBOL
  • Structured: C, Pascal, COBOL
  • Object-Oriented: C++, Smalltalk, Ada?
  • Database-Aware: PowerBuilder, Gupta
  • Component-Based: Visual Basic, Delphi
  • Network-Oriented: Java

What Exactly is Java?

  • Programming Language Invented by Sun Microsystems
  • Syntax is based on C++
    • "C++ without the pitfalls"
  • Runs on all platforms
    • "Write once, run anywhere"
  • Wide industry acceptance
    • IBM, Sun, Netscape, Oracle, Novell, Microsoft

What is Java used for?

  • Applets
    • Embedded programs in web pages
  • Applications
    • Stand-alone applications (no browser required)
  • Servlets
    • Dynamic web page creation
  • Distributed Applications
    • RMI: Remote Method Invocation, CORBA

What makes Java Better?

  • Simple
  • Object-Oriented
  • Distributed
  • Robust
  • Architecture Neutral
  • Multi-Threaded
  • Vendor Neutral

Simple

  • Features:
    • Automatic Memory Mgmt.
    • No pointers
    • No header files or pre-processor
    • No operator overloading
    • No multiple inheritance
  • Benefits:
    • Easier to program
    • Easier to debug
    • Easier to maintain
    • Fewer latent bugs

Object-Oriented

  • Features:
    • Inheritance
    • Encapsulation
    • Polymorphism
    • Component-Based (JavaBeans)
  • Benefits:
    • Programs are more extensible
    • Programs are more maintainable
    • Components allow a division of labor between component makers and component users

Distributed

  • Feature:
    • Network-oriented design
    • Remote Method Invocation (RMI)
  • Benefit:
    • Easily move objects in an n-tier architecture

Robust

  • Feature:
    • Strongly-typed
    • No poiner arithmetic
    • Bounds-checking on arrays
    • Exception handling (try/catch/finally)
    • Build-in security model ("sandbox")
  • Benefit:
    • Programs are more reliable
    • Programs are easier to debug
    • Program bugs are less likely to bring the entire system down.

Architecture Neutral

  • Feature:
    • Runs on PC, Mac, UNIX, Mainframe
    • Data types are machine-independent
  • Benefit:
    • Use one language for all tiers on the application:
      • User Interface
      • Database
      • Business Logic
    • Easily move applications to the most cost-effective platform(s)

Multithreaded

  • Feature:
    • Multi-threading support is built-in to the language
      • The "synchronized" keyword
  • Benefit:
    • Easier to understand than third-party multi-threading tools or non-object-oriented API calls

Vendor Neutral

  • Feature:
    • Not proprietary to a single company
  • Benefit:
    • Not dependent on a single company for tools and support
    • Allows one to pick best-of-breed tools

Review Questions

  1. What makes Java platform independent?
  2. What features of Java make it a robust language?
 
duanhua Tu's Javabook
duanhua Tu's Javabook
duanhua Tu's Javabook