Lecture 01
Lecture 01
Introduction to Object-Oriented
Programming Using Java
Agenda
1- Java Introduction
2- Why Learn Java?
3- Feature of Java
4- Java Development kit(JDK)
5- How does Java Work
• Java was created by James Gosling in 1995 for
Sun Microsystems.
• Java is a Platform Independent Programming
Language that follows the logic of “Write
once, Run anywhere” (WORA).
Java Follow the Concurrent Approach
Note
Hardware and
Programmer
Operating System
JAVA COMPILER
(translator)
JAVA INTERPRETER
(one for each different system)
C++
Java
C
Java better than C++ ?
?
• No Unsafe Structures
• No Multiple Inheritance
• No Operator Overloading
• No Automatic Coercions
• No Fragile Data Types
Java Applications
• We can develop two types of Java programs:
– Stand-alone applications
– Web applications (applets)
package firstprogram;
}
Example…
package fisrtprogram;
int x =10;
int y=20;
int result=x+y;
System.out.println(result);
System.out.println("result="+result);
}
}