Core Java

An Introduction to Java

Copyright © Cay S. Horstmann 2016

Understand the design decisions that shaped Java

Java as a Programming Platform

The “White Paper ” Buzzwords

  1. Simple
  2. Object-Oriented
  3. Distributed
  4. Robust
  5. Secure
  6. Architecture-neutral
  7. Portable
  8. Interpreted
  9. High-performance
  10. Multithreaded
  11. Dynamic

Become familiar with the history of Java

Java Applets and the Internet

A Short History of Java

Java Versions

Version Year New Language Features Number of Classes and Interfaces
1.0 1996 The language itself 211
1.1 1997 Inner classes 477
1.2 1998 The strictfp modifier 1,524
1.3 2000 None 1,840
1.4 2002 Assertions 2,723
5.0 2004 Generic classes, “for each” loop, varargs, autoboxing, metadata, enumerations, static import 3,279
6 2006 None 3,793
7 2011 Switch with strings, diamond operator, binary literals, exception handling enhancements 4,024
8 2014 Lambda expressions, interfaces with default methods, stream and date/time libraries 4,240

Common Misconceptions About Java

Java is an extension of HTML or XML.
Java is a programming language.
Java is an easy programming language to learn.
No programming language as powerful as Java is easy.
Java will become a universal programming language for all platforms.
This is possible in theory, but today, Java is most commonly used in backend systems and Android applications.
Java is just another programming language.
Java has a support system that far exceeds that of most other languages.
Java is proprietary, and it should therefore be avoided.
Java is open source.

Common Misconceptions About Java

Java is interpreted, so it is too slow for serious applications.
The just-in-time compiler can produce code that is as fast as C++, and sometimes faster.
All Java programs run inside a web page.
Applets run in web pages, but most Java programs run on servers or mobile/embedded devices.
Java programs are a major security risk.
Applet security risks are real, but in general Java is very secure.
JavaScript is a simpler version of Java.
JavaScript was named after Java for marketing reasons.
With Java, I can replace my desktop computer with a cheap “Internet appliance.”
That was an expectation 20 years ago, and it may be true today if your Android smart phone or tablet has replaced your desktop.