Java
-
Upload
ahmed-hesham -
Category
Education
-
view
27 -
download
7
Transcript of Java
By :
Types of computer Languages
There are two types of computer languages :
1.Low level language .
2.High level language .
Low Level Language
Low Level languages are machine
codes in the form of 0’s & 1’s .
Two Types of Low level languages :
1.Machine Language .
2.Assembly Language .
High Level Language
High Level languages are format
closely to English Language , that
enables peoples to write programs
easily .
Examples :
C++
Java
Java exercises
public static void main(String[] args) {System.out.println(“Hello World”) ;}
010101010101010101010101
Hello World
Example 1
public static void main(String[] args) {int x ;x=5 ;System.out.println( x ) ;}
010101010101010101010101
5
Example 2
X=5
public static void main(String[] args) {int x ;x=5 ;System.out.print ( “I want ”) ;System.out.print ( x ) ;System.out.println( “ choclates”) ;}
010101010101010101010101
I want 5 choclates
Example 3
X=5
Assignment
اكتب برنامج يقوم بطباعة الجملة : التالية
- Welcome to my first java program.
- I want 4 chairs.اكتب برنامج يقوم بطباعة حساب
٩ ، ٣مجموع رقمين .