Sunday, October 4, 2015

JAVA Basic Terminology

Algorithm: A step-by-step description of how to accomplish a task.
Programs: A computer is a machine that manipulates data and executes lists of instructions known as programs.
Binary Number: A number composed of just 0s and 1s also known as a base-2 number.
Program Execution: The act of carrying out the instructions contained in a program. The process of execution is often called running. A computer program is stored internally as a series of binary numbers known as the machine language of the computer.
Compiler: A program that translates a computer program written in one language into an equivalent program in another language. A compiler that translates directly into machine language creates a program that can be executed directly on the computer known as an executable.
Java Virtual Machine(JVM): A theoretical computer whose machine language is the set of Java bytecodes.
Java Runtime: A program that executes compiled Java bytecodes.
Java Class Libraries: The collection of preexisting Java code that provides solutions to common programming problems.
Console Window: The console window is a classic interaction mechanism where in the computer displays text on the screen and sometimes waits for the user to type responses. This is known as console or terminal interaction. The text the computer prints to the console window is known as the output of the program and anything typed by the user is known as the console input.
Class: A unit of code that is the basic building block of Java programs.
Method: A program unit that represents a particular action or computation.
Statement: An executable snippet of code that represents a complete command.
Identifier: The words used to name parts of Java program are called identifier. Identifier must start with a letter which can be followed by any number of letters or digits. For example, the legal identifiers are - last, hiThere, ThreeBy6 and so on. It is also include the underscore and dollar sign characters(_ and $) which means that the following are legal identifiers as well:  _count, $1cake, MAX_COUNT and so on. The following are illegal identifiers: hi-There, 3by6 etc. Java has a set of predefined identifiers called KEYWORDS that are reserved for particular uses. Keywords can only use for their intended purposes. These words are not appropriate to use the names of identifiers.
Comment: Text that programmers include in a program to explain their code. There are two comment forms in Java. In the first form, open the comment with a slash followed by an asterisk and close it with an asterisk followed by a slash:  /* like this */
Second comment form for shorter, single-line comments. Use two slashes in a row to indicate that the rest of the current line is a comment: //like this
Program Errors: There are three kinds of errors . Syntax errors - occur when you misuse Java. Logic errors - occur when you write code that doesn't perform the task it is intended to perform. Logic error are also called bugs. Computer programmers use words like "bug-ridden" and "buggy" to describe poorly written programs and the process of finding and eliminating bugs from programs is called DEBUGGING . Runtime errors - are logic errors that are so severe that Java stops your program from executing.
Decomposition: A separation into discernible parts each of which is simpler than the whole.
Iterative Enhancement: The process of producing a program in stages adding new functionality at each stage. A key feature of each iterative step is that you can test it to make sure that piece works before moving on.
Static Method: A block of Java statements that is given a name. Static methods are units of procedural decomposition. We typically break a class into several static methods each of which solves some piece of the overall problem.
Method Call: A command to execute another method which causes all of the statements inside that method to be executed.
Flow of Control: The order in which the statements of a program are executed is called the program's flow control.
Common Escape Sequences: 
\t   tab character
\n  new line character
\"  quotation mark
\\  backslash character
Decimal number vs. Binary number:
   0                                     0
   1                                     1
   2                                     10
   3                                     11
   4                                     100
   5                                     101
Unit of Memory Storage:
1 kilobyte(KB) = 1024 byte

Example of Class, Method and Statement:

public class Hello{ ---> class
     public static void main(String[] args){ --->method
          System.out.println("Hello, world"); --->statement
     }
}



[Book: Building JAVA programs]
Chapter #1 

No comments:

Post a Comment