目录

  • 1 Introduction
    • 1.1 Introduction
    • 1.2 Machine Lang, Assembly lang and High-level lang
    • 1.3 History of Java
    • 1.4 Characteristics of Java
    • 1.5 Typical Java Development Environment
    • 1.6 Introduction to Java Application
  • 2 Classes and Objects
    • 2.1 Primitive Types vs. Reference Types
    • 2.2 Classes and Objects
      • 2.2.1 Declaring a Class
      • 2.2.2 Local and Instance Variables
      • 2.2.3 Methods: A Deeper Look
      • 2.2.4 Constructors
  • 3 Control Statements
    • 3.1 Control Structures
    • 3.2 if Selection
    • 3.3 while Repetition
    • 3.4 for Repetition
    • 3.5 do…while repetition
    • 3.6 switch multiple-selection
  • 4 Arrays and Collections
    • 4.1 Arrays
    • 4.2 ArrayList
    • 4.3 Set
    • 4.4 Generic Programming
  • 5 Object-Oriented Programming: Inheritance
    • 5.1 Inheritance
    • 5.2 Superclasses and Subclasses
    • 5.3 Constructors in Subclasses
  • 6 Object-Oriented Programming: Polymorphism
    • 6.1 Polymorphism
    • 6.2 Polymorphic Behavior
    • 6.3 Enable and Disable Polymorphism
  • 7 Exception Handling
    • 7.1 Exceptions
    • 7.2 Error-Handling
  • 8 Java I/O
    • 8.1 Java I/O Streams
    • 8.2 Decorator Design Pattern
  • 9 GUI Components
    • 9.1 AWT and SWING
    • 9.2 Event Model
  • 10 Multithreading
    • 10.1 Life Cycle of a Thread
    • 10.2 Thread Synchronization
    • 10.3 Producer/Consumer
Characteristics of Java


}Simple

§Java is Easy to write and more readable and eye catching.

§Java has a concise, cohesive set of features that makes it easy to learn and use.

§Most of the concepts are drew from C++ thus making Java learning simpler.


}Secure

§Java program cannot harm other systemthus making it secure.

§Java provides a secure means of creating Internet applications.

§Java provides secure way to access web applications.


}Portable

§Java programs can execute in any environment for which there is a Java run-time system.(JVM)

§Java programs can be run on any platform(Linux,Window,Mac)

§Java programs can be transferred overworld wide web (e.g applets)


}Robust

§Java encourages error-free programming by being strictly typed and performing run-time checks.


}Object-oriented

§Java programming is object-oriented programming language.

§Like C++ java provides most of the object oriented features.

§Java is pure OOP. Language. (while C++ is semi object oriented)

}Architecture-neutral

§Java is not tied to a specific machine or operating system architecture.

§Machine Independent i.e Java is independent of hardware .


}Multithreaded

§Java provides integrated support for multithreaded programming.


}Interpreted

§Java supports cross-platform code through the use of Java bytecode.

§Bytecode can be interpreted on any platform by JVM.


}Highperformance

§Bytecodes are highly optimized.

§JVM can executed them much faster .


}Distributed

§Java was designed with the distributed environment.

§Java can be transmit, run over internet.


}Dynamic

§Java programs carry with them substantial amounts of run-time type information that is used to verify and resolve accesses to objects at run time.