Overview of Programming and Java

Main Components of a computer

Memory Concepts

Programming, and Programming Languages

Building Programs

Software development

Involves more than just writing code

The Java Language

Compiling and Running a Java program

Basic Creation and Execution of a Java program

  1. Create source code with a text editor, store to disk
  2. Compilation -- The compiler does syntax checking, translation to bytecode in files with the .class extension
  3. Execution of Java program

Integrated Development Environments

Some Important Java Tools


Comparisons

A managed language like Java has its own strengths and weaknesses. By way of example, here is a general comparison of Java against a fully compiled language like C++

Some benefits of Java (over C++) -- IMHO

Some benefits of C++ (over Java) -- IMHO


Programming is about Problem Solving


A sample Java program

import java.util.Scanner;                 // brings in a library

class Sample                              // class that contains this program
{

  public static void main(String[] args)  // main function, start of program
  {
    Scanner input = new Scanner(System.in);  // creation of object to
                                             // read keyboard input

    int year = 2014;                      // an integer variable declaration
    String entry;                         // a String variable

    System.out.println("Welcome to Java Programming " + year);
    System.out.print("Type 'Q' to quit: ");
    entry = input.next();                 // read input from user

    System.out.print("Goodbye!\n");
  }                                       // end of main()

}                                         // end of class block
A link to this code file