CIS 35A: Introduction to Java Programming

Home | Green Sheet | Lectures | Assignments | FAQ

Introduction

Introduction

The Java language facilitates a disciplined approach to computer program design. Java is a general purpose programming language. Java is the Internet programming language.

Java can be used to develop:

  • applications on the Internet for servers, desktop computers, and small hand-held devices such as smartphones.
  • Java Applets
  • Java Servlets and JavaServer Pages

According to Sun Microsystems (now Oracle), Java is:

  • simple: Java is partially modeled on C++, but greatly simplified and improved.
  • object-oriented: Java was designed from the start to be object-oriented. Object-oriented programming provides great flexibility, modularity, clarity, and reusability through encapsulation, inheritance, and polymorphism.
  • distributed: Distributed computing involves several computers working together on a network. Java is designed to make distributed computing easy.
  • interpreted: You need an interpreter to run Java programs. The programs are compiled into the Java Virtual Machine code called bytecode. The bytecode is machine-independent and can run on any machine that has a Java interpreter, which is part of the Java Virtual Machine (JVM).
  • robust: Java compilers can detect many problems that would first show up at execution time in other languages.
  • secure: Java implements several security mechanisms to protect your system against harm caused by stray programs.
  • architecture-neutral: Write once, run anywhere. With a Java Virtual Machine (JVM), you can write one program that will run on any platform.
  • portable: Because Java is architecture neutral, Java programs are portable. They can be run on any platform without being recompiled.
  • high-performance: Java is high-performance because Java is architecture neutral, Java programs are portable. They can be run on any platform without being recompiled.
  • multithreaded: Multithread programming is smoothly integrated in Java, whereas in other languages you have to call procedures specific to the operating system to enable multithreading.
  • dynamic: Java was designed to adapt to an evolving environment. New code can be loaded on the fly without recompilation. There is no need for developers to create, and for users to install, major new software versions. New features can be incorporated transparently as needed.
Introduction | History | How does Java work? | What you'll do in Java? | Code structure in Java | Anatomy of a class | The main() method