University of Hargeisa: Course: Computer Programming I (Java)
University of Hargeisa: Course: Computer Programming I (Java)
Lecture One
Presented by:
Sahardiid Ahmed Ali
Chapter 1
Introduction to Java
Chapter 1 Slide 2
Learning Objectives
At the end of the lesson student should be able to:-
Chapter 1 Slide 3
Introduction
Chapter 1
Slide 4
Types of Programming Language
Chapter 1 Slide 5
High Level Language
Chapter 1 Slide 6
Low Level Language
Chapter 1 Slide 7
Java Running Process
Compiler
Chapter 1 Slide 8
Java is modern Programming language which apply different
Platform Applictions.
Chapter 1
Slide 9
The Java Environment
Chapter 1
Slide 10
Basic Program Development
Chapter 1
Slide 11
Problem Solving
The purpose of writing a program is to solve a problem
Chapter 1
Slide 12
Java Applications
2. Desktop Applications
3. Client/Server App
4. Mobile Applications
5. Game Applications
Chapter 1 Slide 13
Popular Java Editors
Chapter 1
Slide 14
Characteristices of Java
1. Java is simple
2. Java Virtual Machine(JVM)
3. Java is OOP
4. Platform Independent
5. Java dependent class libraries
6. Java is Portable
7. Java is Secure
8. Etc.
Chapter 1
Slide 15
Characteristices of Java
Java Virtual Machine(JVM)
Java Virtual Machine (JVM) is a special environment for Java that translates
programs into machine language, making Java a platform independent of
operating systems.
Chapter 1
Slide 16
Characteristices of Java
Platform Independent
Every operating system has its own Java Virtual Machine(JVM),
and the same software can run on multiple operating systems.
Chapter 1
Slide 17
Characteristices of Java
Java is Portable
java code that is written on one machine can run on another
machine. The platform independent byte code can be carried to
any platform for execution that makes java code portable.
Java is Secure
With Java's secure feature it enables to develop virus-free,
tamper-free systems. Authentication techniques are based on
public-key encryption.
Chapter 1
Slide 18
Methods for writing java Programs
Chapter 1
Slide 19
Methods for writing java Programs
Chapter 1
Slide 20
Installing of JDK Setup
1. Open My Computer
2. Go to C partation
3. Go Program Files
4. Go to Java File jdk1-15.0.2
5. Go to Bin
Then we will get the necessary files which was discussed before.
Javac.exe
Java.exe
Appletviewer.exe
Chapter 1
Slide 21
Installing of JDK Setup
Chapter 1
Slide 22
Java Terminology
Chapter 1
Slide 23
Java Terminology
Chapter 1
Slide 24
Java Terminology
Errors
• An error in a program is called a bug.
• Eliminating errors is called debugging.
Chapter 1
Slide 25
Java Terminology
Syntax Errors
Grammatical mistakes in a program.
The grammatical rules for writing a program are very strict
The compiler catches syntax errors and prints an error message.
Example: using a period where a program
expects a comma
Chapter 1
Slide 26
Java Terminology
Runtime Errors
Errors that are detected when your program is running, but not
during compilation.
When the computer detects an error, it terminates the program
and prints an error message.
Example: attempting to divide by 0
Chapter 1
Slide 27
Java Terminology
Logic Errors
Errors that are not detected during compilation or while
running, but which cause the program to produce incorrect
results.
Example: an attempt to calculate a Fahrenheit temperature from
a Celsius temperature by multiplying by 9/5 and adding 23
instead of 32
Chapter 1
Slide 28
Any Question??
Chapter 1
Thanks