Parts of a Computer
Why Use Binary Numbers?
Source Code - Assembly - Machine Code
Why Java? Safety The safety features of the Java language make it possible to run Java programs in a browser without fear that they might attack your computer. As an added benefit, these features also help you to learn the language faster. When you make an error that results in unsafe behavior, you receive an accurate error report. Portability The other benefit of Java is portability. The same Java program will run, without change, on Windows, UNIX, Linux, or Macintosh. In order to achieve portability, the Java compiler does not translate Java programs directly into CPU instructions. Instead, compiled Java programs contain instructions for the Java virtual machine, a program that simulates a real CPU. Portability is another benefit for the beginning student. You do not have to learn how to write programs for different platforms.
Java Versions
every Java program has a class the program must have a main method A Java Program
programming languages use reserve words that have special meaning and cannot be used for other purposes the programmer names the program and decides what it should do this line tells the computer where to display the message later, we will learn some other options for displaying messages
Another Java Program line numbers are used in book to help with descriptions of programs book uses a different style to define program blocks
Another Java Program
Computers can "Do the Math"
Steps in the Development of a Java Program
JVM 1 JVM 2 JVM 3 JVM n : One Bytecode, Many JVM's Java Source Code Text Editor File Access Program I/O - Compiler Messages jGrasp Integrated Development Environment (IDE) There is a different configuration of the Java Virtual Machine (JVM) for every platform (type of computer) and Operating System (OS) this computer that computer mobile device the other computer
Installing NetBeans The NetBeans Integrated Development Environment (IDE) is available at the NetBeans Web site: If the Java Development Kit (JDK) is not already installed on your computer, you will need to download and install it as well. The JDK is available on the Oracle Web site: The Standard Edition (SE) is preferred for both NetBeans and the JDK.
don't forget to accept the license agreement For Windows OS bit computers use x86 version 64-bit computers use x64 version
NetBeans IDE 7.4
New Project
Project Name
Writing the Source Code
Installing jGrasp
Starting jGrasp
Quick Start Open - Compile - Run
A New Editor Window in jGrasp
Creating and Saving a Java Program
The Encode / Debug Cycle
Summary A Textbook for Two Courses Parts of a Computer Why Computers use binary numbers. Source Code, Assembly, and Machine Code Structure of a Java Program Java Program Development Bytecode and the JVM Installing and Using jGrasp Encoding and Debugging