Introduction to Computer Science using Java

Peter Kitson

ISBN : -

Order a printed copy of this book from Amazon --UNAVAILABLE--

Cover Design - Introduction to Computer Science using Java

For your free electronic copy of this book please verify the numbers below. 

(We need to do this to make sure you're a person and not a malicious script)



Sample Chapter From Introduction to Computer Science using Java
     Copyright © Bradley Kjell

Introduction to Computer Science using Java

Bradley Kjell, Central Connecticut State University

This is a first course in Computer Science using the programming language Java. It covers the fundamentals of programming and of computer science.

For maximum benefit, go though these notes interactively, thinking about and answering the question at the bottom of each page. There are about 15 pages per chapter. If you spend about 3 minutes per page each chapter will take about 45 minutes; much more, if you copy and run some of the programs. If you are a beginning programmer, plan on spending more than a month with this.

These notes assume that you have the Java Development Kit (JDK) version 1.3 or later from Sun ( and a text editor such as NotePad. They may be used with more sophisticated environments, as well. For more about these notes check the frequently asked questions.

CHAPTER 5—Introduction to Java

The previous chapters have discussed computer hardware, computer software, bits and bytes, machine language, language translation, language interpretation, and virtual machines. This chapter assumes that you know all that and are ready to look at Java.

Chapter Topics:

  • Hello World program.
  • Java Bytecodes.
  • Java compiler and Java virtual machine.
  • Using Notepad to create a source program.
  • Running a Java program.

These notes, assume you are using the Java Development Kit (JDK) version 1.3 or higher. The current release is version 1.4 (as of May, 2002). Earlier versions will usually work for these notes and may be easier to obtain (perhaps on a CD that came with a book.) 

Installing Java

To run Java you need a computer that is running one of

  • Windows 95© or higher,
  • Windows NT© or higher,
  • most versions of Unix (including Linux),
  • or a recent Apple.

These Notes were prepared using Windows NT 4.0 (but with minor mental adjustment will work with any OS.)

The Java Development Kit (JDK) is a collection of software available at no charge from Sun Microsystems, Inc. At the time of writing (May 20, 2002) the download is available at Detailed instructions on how to download it and install it are available at that site. If you have not yet installed Java, get the most recent version. The JDK for Windows comes in a file named jdk1_4-win.exe (or a similar name.)

While you are at that site (or later if you don't have time) get the Java documentation. This comes in a file You will have to "un-zip" it when you get it. On most computers un-zipping a file can be started by clicking on the file name. You will end up with a set of web pages (stored on your computer) that describe most of the JDK.

If clicking in the name of the file does not unzip it, you need to install (yet another) program on your computer.