Wednesday, January 19, 2011

Introduction Java Programming Language

Structure Java Program
Java is object oriented programming language. In java have a different way to write programming than the others. Source program in java is consist of classes. In classes is consists of attributes and method. Attributes is use to initializes data type while method is use to initializes procedure or function that will execute letter.
In java program have some class so there have 1 class will be main classes while other classes is complement.

This is a structure class in java:


public class [Class Name] {
[Variabel Definition]
...
[Constructor]
...
[Methods]
...
Public static void main(String[] args) {
...
}
}


Variabel
Variabel is a place to store data temporarily. If want to use variabel you must declare data type and name of variabel. In declaration variabel there have a rule, starting with letter and not containt special character like space, &, #, .,and other.

Data Type
1. Boolean = Return true or false.
2. Byte = Return between 1 byte (8 bit).
3. Char = Character or letter.
4. Double = Ranges value between (-1.7 x 10308) to +1.7E308 (+1.7 x 10308).
5. Float = Range value between -3.4E38 (-3.4 x 1038) to +3.4E38 (+3.4 x 1038).
6. Int = Integer.
7. Long = Long Integer.
8. Short = Short Integer.

Operators
Operators is sepecial command in java to modification process or selection with certain criteria to produce a new information or a new condition.
1. Aritmethic Operators
->This operator is used to calculate and aritmethic process. Aritmethics operators is usually used by programmer to produce number output.
- + -> Plus
- - -> Minus
- * -> Times
- / -> Divide
- % -> Modulo
- + -> Plus 1
- - -> Minus 1
2. Logical Operators
- & ->AND
- || -> OR
- ! -> NOT
3. Relational Operator
- == -> Equal than
- != -> Not Equal
- > -> Bigger
- < -> Less
- >= - >Bigger than
- <= -> Less than

Okay that's is it. Thank you for see this tutorial I hope this tutorial can help you..^^

No comments:

Post a Comment