Sunteți pe pagina 1din 2

Programming a GPC(General purpose computer)

Low-Level lang
===========
The hardware can be controlled using machine language
01001011001010010010010010101
High-Level lang
===============
Assembly language can be controlled with english words
this more friendly
MOV AX, BX

******* ABOUT JAVA ********


JAVA HISTORY
Java 1.0 8 packages , 212 classes
Java 1.1 23 packages , 504classes
Java is developed by Sun Microsystems in 1996.
Now the Java is powerful tools for the development of robust and enterprise ap
plications.

Java 1.5.0_06 December 2005


Java 1.5.0_05 October 2005
Java 1_5_0_04 July 2005
Java 1_5_0_01 February 2005
Java 2 Platform, Standard Edition 1.4 (J2SE 1.4) February 2002
Java 2 Platform, Standard Edition 1.3 (J2SE 1.3) May 2000
Java 2 Platform, Enterprise Edition (J2EE) December 1999
Java 2 Platform, Standard Edition (J2SE) August 1999
Java Development Kit 1.2 (JDK 1.2) December 1998
Java Development Kit 1.1 (JDK 1.1) February 1997
Java Development Kit 1.0 (JDK 1.0) January 1996

What is JDK (Java Development Kit)


JDK is a software development program provided by sun Microsystems.
Java Development Kit or JDK comes in various version and can be downloaded free
from the sun Microsystems.
JVM compiler, debugger and other tools are used with JDK for developing java ba
sed application & java applets. So make sure that your JVM compiler & JDK versio
ns are same.
That comes in three editions J2ME, J2SE & J2EE. If you are beginner or learning
Java then start by downloading J2SE.
Java is a high level programming language and it is used to develop the robust a
pplication. Java application program is platform independent and can be run on a
ny operating System

Class Declaration:
Class is the building block in Java, each and every methods & variable exists wi
thin the class or object. (instance of program is called object ). The public wo
rd specifies the accessibility of the class. The visibility of the class or func
tion can be public, private, etc. The following code declares a new class "Hello
World" with the public accessibility:
public class HelloWorld {

The main Method:


The main method is the entry point in the Java program and java program can't ru
n without main method.
JVM calls the main method of the class. This method is always first thing that i
s executed in a java program. Here is the main method:
public static void main(String[] args) {
......
.....
}
{ and is used to start the beginning of main block and } ends the main block. Ev
ery thing in the main block is executed by the JVM.
The code:
System.out.println("Hello, World");
prints the "Hello World" on the console. The above line calls the println method
of System.out class.

Literal Data
===============
How can you tell if 12 is a byte, short, int or long?
By default, literals w/o a decimal point are
int and with a decimal point are double
You can use 12345L to make a long
12.3456F can be used for float
Byte/Short don t have equivalents

S-ar putea să vă placă și