Programming Vocabulary
Source Code A text editor used to type your program.
Syntax A specific format used to create your program.
Import Includes other libraries. import cs1.keyboard- another class or library that allows you to use other key words.
// Comments - Used to write notes about the program. /* - this is one content that spans several lines. */
Public Class (Name of program): The #include directive is a special instruction for the java compiler that tells the compiler to include the contents of another file.
Public static void main (string [] args) Void main is the name of a function. A function is simply a block of code that performs a task.
{ } The braces mark the beginning and the end of the code block.
Variables Variables are simply memory locations that the program will use while it is running.
; Variables are considered a statement and therefore ends in a semicolon.
Keyboard.readInt() Input statement Keyboard.readInt() pauses the program to allow the user to enter the current weekly pay.
System.out.print System.out.pirntin returns to a new line.
* / + - These symbols are used in mathematical equations Multiply * Divide / Add + Subtract -
White Space White Space is used to separate the word and symbols used in a program.
Complier A program that translates code in one language to equivalent code in another language.
IDE IDEs combine an editor, compiler, and other Java support tools into a single application.
Three Types of Errors Compile-time error Runtime error Logical error
Java Developed by Sun Microsystem High-Level programming language One reason for its wide-spread use is the ability to create platform independent applications.
Object, Classes, & Packages An object consists of related data and the instructions for performing actions on that data A class defines the type of data actions on that will be associated with an object of that class. A package, sometimes calle a library is a group of related classes.
Object, Classes, & Packages Library Fiction Biography Classes Name of Book Name of Book Object
Code Conventions An introductory comment should begin a program Package names should begin with a lowercase Class names should be nouns and beginwith an Uppercase letter A comment block should be included before each class.
Code Conventions Comments should not repeat what is clear for looking a the code Statements in a method should be indented. An oopen curly brace { should be placed on the same line as the class or method declaration.