You are on page 1of 14

07/19/2023 Badakhshan University Faculty of Computer 1

Science
Islamic Republic of Afghanistan
Ministry of Higher Education
Kabul University
Physics Faculty

Programming Fundamentals
JAVA 1

Lecturer : Mohammad Qias (Mohammadi)

07/19/2023 Badakhshan University Faculty of Computer 2


Science
Lecture #3
Java History and Introduction

07/19/2023 Badakhshan University Faculty of Computer 3


Science
Java History
For the first time java was created by Jams Gosling Founder of Sun
Micro System in 1995.
First time java was nominated with Oak because the expense of
working room was from oak tree.
Jams Gosling from rules of C++ So it was the reason for creating java.
The challenge of this company was to write once and use every where
in a program.

te07/19/2023 Badakhshan University Faculty of Computer 4


Science
Continue…
After that Sun team decided to find the standard name for java.
Java is stand for(James Gosling, Arthur, Van Hoff and Andy
Bechtolsheim).
They were working in Coffee Shop because coffee symbol is used for
java programming language.
Java is similar to C++ but has easily object modeling.
Java was published formally in 1995 to the market.

07/19/2023 Badakhshan University Faculty of Computer 5


Science
Continue…
Now Java is used in more than 3 Mil yard devices and printed more
than 1000 books about java.
The Syntax of Java is taken from C family means C and C++.
Java is an object oriented programming language
Java is a garbage collector that manage heap storage.
Java is not dependent on Hardware and Software.

07/19/2023 Badakhshan University Faculty of Computer 6


Science
Continue…
In 2010 java was soled by Oracle Company and up to now new
version is released by this company.
The new version of java is 1.8 or java 8.

Java is an Object Oriented programming language.

Java code is translated into bytecode.

JVM(Java Virtual Machine) converts bytecode into machine code.

07/19/2023 Badakhshan University Faculty of Computer 7


Science
Characteristics of Java
Java is simple
Java is object-oriented
Java is robust
Java is secure
Java is architecture-neutral
Java’s performance
Lightweight

07/19/2023 8
Badakhshan University Faculty of Computer 8
Science
Java vs. JavaScript
JavaScript is a different language from Java, albeit with some similarities.
A JavaScript program is written in the HTML page, and executed by the
JavaScript interpreter, so also allows dynamic web page content in the browser
window.
JavaScript is special purpose - it is an object-based language that deals directly
with browser entities like windows, text fields, forms, frames and documents.
JavaScript can respond to browser events like mouse clicks and user-typed text.
JavaScript is fast to write, but not as powerful as Java.

07/19/2023 Badakhshan University Faculty of Computer 9


Science
Java Tools
Any text editor as Notepad, Notepad++
Net bean
Eclipse
JDK

07/19/2023 10
Badakhshan University Faculty of Computer 10
Science
Getting Started with Java Programming
Writing Java Code

 Compiling Programs

 Executing Applications

07/19/2023 11
Badakhshan University Faculty of Computer 11
Science
A Simple Application

Example 1.1
//This application program prints Welcome to Java!
package chapter1;

public class Welcome {


public static void main(String[] args) {
System.out.println("Welcome to Java!");
}
}

07/19/2023 12
Badakhshan University Faculty of Computer 12
Science
First Simple Example
package javaapplication1;

public class JavaApplication1 {

public static void main(String[] args) {


int x=10;
int y=20;
int sum =0;
System.out.println("The sum of x+y=:"+sum);

}}

07/19/2023 Badakhshan University Faculty of Computer 13


Science
Thanks From Your Attention
Any Questions
&
Suggestions

Email: mqm.dacaar@gmail.com
Phone: +0789152242

07/19/2023 Badakhshan University Faculty of Computer 14


Science

You might also like