C++ and Java

1/29/00


Click here to start


Table of Contents

C++ and Java

Java Origins

Java: Design Goals

Java Killer APP

C++

Java and C++: Similarities

Java and C++: Differences

Java and C++: Some Operator Differences

Differences from C and C++

Java Classes

Java Exceptions

Inheritance

Abstract Base Classes

Java Enhanced Abstract Base Classes

Java Interfaces

Interface with inheritance

Java Applet

Applets

GCD Applet Code

Data Fields

Header for GCDAPPLET.java

More Applet Code

init() method

The gcd() Method

Comments on the gcd() Method

More GCD Applet Code

Explanation

C++ STL - Standard Template Library

Typical Container Algorithm

C++ STL - Vector in place of arrays

Using STL vector

C++ Reference Counts

C++ Reference Counting

C++ Reference Counting Semantics

Reference Counted String Class (1 of 4)

Reference Counted String Class (2 of 4)

Reference Counted String Class (3 of 4)

Reference Counted String Class (4 of 4)

Comments on Reference Count (1 of 2)

Comments on Reference Count (2 of 2)

Iterators

Using an iterator

Comments on Iterators

Vectors in detail

Vector as a Sequence Containers

Java Abstract Window Toolkit (awt)

GUI Elements

Threads

The Dining Philosophers

Threads - Dining Example (1 of 2)

Threads Example (2 of 2)

Threads - Dining Example Comments

Wrapper Classes

Java: Why it succeeds

Java Vs. C++

Java is Simpler than C++

Java has Garbage Collection

Java is Consistent Across Platforms

Java Security and Miscellaneous

C++ Vs. Java

Where C++ is Better than Java (1 of 3)

Where C++ is Better than Java (2 of 3)

Where C++ is Better than Java (3 of 3)

Email: pohl@cse.ucsc.edu

Home Page: http://www.cse.ucsc.edu/~pohl