SlideShare a Scribd company logo
University of Aden
Faculty of Computer & Information Technology
Computer Programming I
Java Programming Language
2
Breakdown of Assessment
Final Exam 50%
Coursework 50%
Test 20%
Lab 20%
Assignment 10%
3
Course Instructions
Hardware:
Faculty’s lab computers: A USB flash drive. Your own computer: Must be able to
run NetBeans or Eclipse IDE or Android Studio or IntelliJ.
Software:
Description IDE
A free, open-source IDE that runs on most modern operating systems. NetBeans is
commonly used for developing most types of Java applications, but not for Android apps.
NetBeans
A free, open-source IDE that runs on most modern operating systems. Eclipse is
commonly used for developing most types of Java applications, but not for Android apps.
Eclipse
The Community Edition of this IDE is a free, open-source IDE that runs on most modern
operating systems.
IntelliJ
An IDE specifically designed for Android development that’s based on IntelliJ IDEA and
backed by Google.
Android Studio
Java Programming Language Slide 4
An Introduction to Java
Programming
Lecture 1: An Introduction To Java Programming
Java Programming Language
Outline
 Basic programming concepts
 Program
 Programming languages
 Low-level language
 High-level language
 Java programming Language
 Overview of Java
 Bytecode & Java Virtual Machine
 Characteristics of Java
 A Simple Java Program
 JDK, JRE & API
 Install and configure the JDK
 Developing Java Program using Notepad
 Install the Eclipse IDE
Slide 5
Java Programming Language
Basic Programming Concepts
Program
A program is a set of instructions that tells a computer what to do in
order to perform a specific task.
Programming Language
A programming language is a formal language designed to
communicate instructions to a computer.
Slide 6
Java Programming Language
Basic Programming Concepts (continued)
Slide 7
Programming
Languages
Machine
Language
Assembly
Language
High-Level
Language
Low-Level
Language
Java Programming Language
Basic Programming Concepts (continued)
Machine Language (low level language)
It is the only language that is directly understood by the computer, and it does
not need to be translated. All instructions use binary notation and are
written as a sequence of 1s and 0s.
For example, here’s a weekly wages equation that multiply hours by an hourly
rate and stores the result in wages:
Machine language are cumbersome for humans. This is why assembly
languages come in.
Slide 8
100100 010001
100110 010010
100010 010011
wages = rate * hours
=
Java Programming Language
Basic Programming Concepts (continued)
Assembly Language (low level language)
An assembly language is the first step to improve programming structure and
make machine language more readable by humans. An assembly language
consists of a set of symbols and letters called a mnemonic codes.
A translator is required to translate the assembly language to machine
language. This translator program is called the assembler
The following section of an assembly-language to calculate a weekly wages
equation also multiply hours by an hourly rate and stores the result in
wages:
Slide 9
LOAD rate
MULT hours
STOR wages
wages = rate * hours
=
Java Programming Language
Basic Programming Concepts (continued)
High level language
A high-level language is very similar to human languages and has a set of
grammar rules that are used to make instructions more easily.
High-level languages are the languages most often used by programmers to
write programs. ( C++, Fortran, Pascal, Visual Basic, Java and Python)
A program written in a high-level language must be translated into machine
code for execution. This can be done using another programming tool called
an interpreter or a compiler.
Slide 10
wages = rate * hours
Java Programming Language
Java Programming Language
Java
In 1995, Sun Microsystems released a new programming language called
Java. Today, Java is owned by Oracle and is one of the most widely used
programming languages in the world. (James Gosling is the father of Java)
Java is a full-fledged and powerful language that can be used in many ways. It
comes in three editions:
 Java Standard Edition (Java SE) to develop client-side applications. The
applications can run on desktop.
 Java Enterprise Edition (Java EE) to develop server-side applications, such as
Java servlets, JavaServer Pages (JSP), and JavaServer Faces (JSF).
 Java Micro Edition (Java ME) to develop applications for mobile devices, such as
cell phones.
Slide 11
Java Programming Language
Java Programming Language (continued)
Java
A key goal of Java is to be able to write programs that will run on
a great variety of computer systems and computer-controlled
devices. This is sometimes called “write once, run anywhere.”
Java applications are typically compiled to bytecode that can run
on any Java virtual machine (JVM) regardless of the underlying
computer architecture.
Slide 12
Java Programming Language
Java Programming Language (continued)
Bytecode & Java Virtual Machine
To run a Java program on a computer, the program must first be translated
into a platform-independent format called bytecode and then interpreted
into a particular machine language.
To make Java programs machine independent, the designers of the Java
language introduced a hypothetical computer called the Java Virtual
Machine (JVM).
Bytecode is the machine language for the JVM.
Slide 13
Java Programming Language
Java Programming Language (continued)
Java Source-Code
compiler
Java bytecode
Win
Mac
Unix
JVM
Interpreter
JVM
Interpreter
JVM
Interpreter
Slide 14
Welcome.java Welcome.class
Java Programming Language
Characteristics of Java
 Java Is Simple
 Java Is Portable “write once, run anywhere”
 Java Is general-purpose programming language
 Java Is Object-Oriented structure
 Java Is Secure
Slide 15
Java Programming Language
A Simple Java Program
Slide 16
public class Welcome {
public static void main(String[] args)
{
System.out.println("Welcome to
Java");
}
}
Welcome to
Java
Class Name
Star with main method
Execute Statement
Statement Terminator
Output
// This is your first program
Java Programming Language
JDK, JRE & API
Java Development Kit (JDK)
The Java Development Kit (JDK) includes a compiler, a runtime environment,
and other tools that you can use to develop Java applications.
Java runtime environment (JRE)
It has all of the components necessary to run bytecode including a JVM. Since
JREs are available for most operating systems, Java bytecode can be run on
most operating systems.
Application program interface (API)
It also known as library, contains predefined classes and interfaces for
developing Java programs. You can view the latest Java API documentation
at https://docs.oracle.com/en/java/javase/16/
Slide 17
JDK
JRE
JVM
Java Programming Language
Before We Begin
1. Java Development Kit (JDK) Installation
 JDK 16.1 for Windows is available from
https://www.oracle.com/java/technologies/javase-jdk16-downloads.html
2. Setting the PATH Environment Variable
Slide 18
Java Programming Language
Creating, Compiling & Executing a Java Program
 When you develop a Java application, you typically use a code
editor to work with the source code for the application. Files
that contain source code have the .java extension.
 The Java compiler translates Java source code into a platform-
independent format known as Java bytecode. Files that contain
Java bytecode have the .class extension.
 A Java virtual machine (JVM) includes a Java interpreter that
executes Java bytecode. Most modern implementations of the
JVM have replaced the Java interpreter with a just-in-time
compiler (JIT compiler).
 A JIT compiler is similar to an interpreter in some ways, but it
improves performance significantly.
Slide 19
Java Programming Language
Programming errors
 Programming errors can be categorized into three types:
syntax errors, runtime errors, and logic errors.
 Syntax errors or compile errors (Result from errors in code
construction).
 Runtime errors (Errors that cause a program to terminate
abnormally. They occur while a program is running if the
environment detects an operation that is impossible to carry
out).
 Logic errors (They occur when a program does not perform the
way it was intended to).
Slide 20
1
2
3
Slide 21
Java Programming Language
Compiling and Running Java from Eclipse
Java Integrated Development Environments (IDEs)
 There are many Java integrated development environments that you can
use for Java programming. (NetBeans, Eclipse and IntelliJ)
https://www.eclipse.org/downloads/
Slide 22

More Related Content

PPT
Chapter 1 java
PPTX
1_Introduction to Java.pptx java programming
PPT
Servlets and JavaServer Pages (JSP) from the B.Sc. Computer Science and Infor...
PDF
(Ebook pdf) java programming language basics
PPTX
java intro.pptx
PDF
Java programming language basics
PDF
Java Programming
PPTX
Chapter-introduction about java programming
Chapter 1 java
1_Introduction to Java.pptx java programming
Servlets and JavaServer Pages (JSP) from the B.Sc. Computer Science and Infor...
(Ebook pdf) java programming language basics
java intro.pptx
Java programming language basics
Java Programming
Chapter-introduction about java programming

Similar to 01_Java_Programming_Lecture-01_FCIT.pptx (20)

DOCX
JAVA CORE
PDF
J introtojava1-pdf
DOCX
Introduction to java programming tutorial
PDF
Java Programming
PDF
Introduction to Java Programming.pdf
PPT
Java Programming : introduction
DOCX
Introduction to java
PDF
Java interview question
PPT
Java-Unit-I.ppt
DOCX
JAVA First Day
PPTX
Introduction to java
PPTX
Java Programming Tutorials Basic to Advanced 1
PPSX
Java Semimar Slide (Cetpa)
PPSX
Java Semimar Slide (Cetpa)
PPTX
JAVA Module 1______________________.pptx
PPT
Java2020 programming basics and fundamentals
PPSX
JAVA.ppsx java code java edv java development
PPTX
ITC 110 Week 9 - Introduction to Porgramming .pptx
PPTX
Modern_2.pptx for java
PDF
Java lab1 manual
JAVA CORE
J introtojava1-pdf
Introduction to java programming tutorial
Java Programming
Introduction to Java Programming.pdf
Java Programming : introduction
Introduction to java
Java interview question
Java-Unit-I.ppt
JAVA First Day
Introduction to java
Java Programming Tutorials Basic to Advanced 1
Java Semimar Slide (Cetpa)
Java Semimar Slide (Cetpa)
JAVA Module 1______________________.pptx
Java2020 programming basics and fundamentals
JAVA.ppsx java code java edv java development
ITC 110 Week 9 - Introduction to Porgramming .pptx
Modern_2.pptx for java
Java lab1 manual
Ad

Recently uploaded (20)

PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
Pre independence Education in Inndia.pdf
PDF
English Language Teaching from Post-.pdf
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PPTX
Onica Farming 24rsclub profitable farm business
PPTX
UNDER FIVE CLINICS OR WELL BABY CLINICS.pptx
PDF
Electrolyte Disturbances and Fluid Management A clinical and physiological ap...
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PPTX
Revamp in MTO Odoo 18 Inventory - Odoo Slides
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PDF
Module 3: Health Systems Tutorial Slides S2 2025
PDF
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
PPTX
Nursing Management of Patients with Disorders of Ear, Nose, and Throat (ENT) ...
PPTX
Open Quiz Monsoon Mind Game Final Set.pptx
PPTX
NOI Hackathon - Summer Edition - GreenThumber.pptx
PPTX
How to Manage Starshipit in Odoo 18 - Odoo Slides
PPTX
Open Quiz Monsoon Mind Game Prelims.pptx
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
STATICS OF THE RIGID BODIES Hibbelers.pdf
Pre independence Education in Inndia.pdf
English Language Teaching from Post-.pdf
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
Onica Farming 24rsclub profitable farm business
UNDER FIVE CLINICS OR WELL BABY CLINICS.pptx
Electrolyte Disturbances and Fluid Management A clinical and physiological ap...
102 student loan defaulters named and shamed – Is someone you know on the list?
Revamp in MTO Odoo 18 Inventory - Odoo Slides
O5-L3 Freight Transport Ops (International) V1.pdf
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
Module 3: Health Systems Tutorial Slides S2 2025
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
Nursing Management of Patients with Disorders of Ear, Nose, and Throat (ENT) ...
Open Quiz Monsoon Mind Game Final Set.pptx
NOI Hackathon - Summer Edition - GreenThumber.pptx
How to Manage Starshipit in Odoo 18 - Odoo Slides
Open Quiz Monsoon Mind Game Prelims.pptx
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Ad

01_Java_Programming_Lecture-01_FCIT.pptx

  • 1. University of Aden Faculty of Computer & Information Technology Computer Programming I Java Programming Language
  • 2. 2 Breakdown of Assessment Final Exam 50% Coursework 50% Test 20% Lab 20% Assignment 10%
  • 3. 3 Course Instructions Hardware: Faculty’s lab computers: A USB flash drive. Your own computer: Must be able to run NetBeans or Eclipse IDE or Android Studio or IntelliJ. Software: Description IDE A free, open-source IDE that runs on most modern operating systems. NetBeans is commonly used for developing most types of Java applications, but not for Android apps. NetBeans A free, open-source IDE that runs on most modern operating systems. Eclipse is commonly used for developing most types of Java applications, but not for Android apps. Eclipse The Community Edition of this IDE is a free, open-source IDE that runs on most modern operating systems. IntelliJ An IDE specifically designed for Android development that’s based on IntelliJ IDEA and backed by Google. Android Studio
  • 4. Java Programming Language Slide 4 An Introduction to Java Programming Lecture 1: An Introduction To Java Programming
  • 5. Java Programming Language Outline  Basic programming concepts  Program  Programming languages  Low-level language  High-level language  Java programming Language  Overview of Java  Bytecode & Java Virtual Machine  Characteristics of Java  A Simple Java Program  JDK, JRE & API  Install and configure the JDK  Developing Java Program using Notepad  Install the Eclipse IDE Slide 5
  • 6. Java Programming Language Basic Programming Concepts Program A program is a set of instructions that tells a computer what to do in order to perform a specific task. Programming Language A programming language is a formal language designed to communicate instructions to a computer. Slide 6
  • 7. Java Programming Language Basic Programming Concepts (continued) Slide 7 Programming Languages Machine Language Assembly Language High-Level Language Low-Level Language
  • 8. Java Programming Language Basic Programming Concepts (continued) Machine Language (low level language) It is the only language that is directly understood by the computer, and it does not need to be translated. All instructions use binary notation and are written as a sequence of 1s and 0s. For example, here’s a weekly wages equation that multiply hours by an hourly rate and stores the result in wages: Machine language are cumbersome for humans. This is why assembly languages come in. Slide 8 100100 010001 100110 010010 100010 010011 wages = rate * hours =
  • 9. Java Programming Language Basic Programming Concepts (continued) Assembly Language (low level language) An assembly language is the first step to improve programming structure and make machine language more readable by humans. An assembly language consists of a set of symbols and letters called a mnemonic codes. A translator is required to translate the assembly language to machine language. This translator program is called the assembler The following section of an assembly-language to calculate a weekly wages equation also multiply hours by an hourly rate and stores the result in wages: Slide 9 LOAD rate MULT hours STOR wages wages = rate * hours =
  • 10. Java Programming Language Basic Programming Concepts (continued) High level language A high-level language is very similar to human languages and has a set of grammar rules that are used to make instructions more easily. High-level languages are the languages most often used by programmers to write programs. ( C++, Fortran, Pascal, Visual Basic, Java and Python) A program written in a high-level language must be translated into machine code for execution. This can be done using another programming tool called an interpreter or a compiler. Slide 10 wages = rate * hours
  • 11. Java Programming Language Java Programming Language Java In 1995, Sun Microsystems released a new programming language called Java. Today, Java is owned by Oracle and is one of the most widely used programming languages in the world. (James Gosling is the father of Java) Java is a full-fledged and powerful language that can be used in many ways. It comes in three editions:  Java Standard Edition (Java SE) to develop client-side applications. The applications can run on desktop.  Java Enterprise Edition (Java EE) to develop server-side applications, such as Java servlets, JavaServer Pages (JSP), and JavaServer Faces (JSF).  Java Micro Edition (Java ME) to develop applications for mobile devices, such as cell phones. Slide 11
  • 12. Java Programming Language Java Programming Language (continued) Java A key goal of Java is to be able to write programs that will run on a great variety of computer systems and computer-controlled devices. This is sometimes called “write once, run anywhere.” Java applications are typically compiled to bytecode that can run on any Java virtual machine (JVM) regardless of the underlying computer architecture. Slide 12
  • 13. Java Programming Language Java Programming Language (continued) Bytecode & Java Virtual Machine To run a Java program on a computer, the program must first be translated into a platform-independent format called bytecode and then interpreted into a particular machine language. To make Java programs machine independent, the designers of the Java language introduced a hypothetical computer called the Java Virtual Machine (JVM). Bytecode is the machine language for the JVM. Slide 13
  • 14. Java Programming Language Java Programming Language (continued) Java Source-Code compiler Java bytecode Win Mac Unix JVM Interpreter JVM Interpreter JVM Interpreter Slide 14 Welcome.java Welcome.class
  • 15. Java Programming Language Characteristics of Java  Java Is Simple  Java Is Portable “write once, run anywhere”  Java Is general-purpose programming language  Java Is Object-Oriented structure  Java Is Secure Slide 15
  • 16. Java Programming Language A Simple Java Program Slide 16 public class Welcome { public static void main(String[] args) { System.out.println("Welcome to Java"); } } Welcome to Java Class Name Star with main method Execute Statement Statement Terminator Output // This is your first program
  • 17. Java Programming Language JDK, JRE & API Java Development Kit (JDK) The Java Development Kit (JDK) includes a compiler, a runtime environment, and other tools that you can use to develop Java applications. Java runtime environment (JRE) It has all of the components necessary to run bytecode including a JVM. Since JREs are available for most operating systems, Java bytecode can be run on most operating systems. Application program interface (API) It also known as library, contains predefined classes and interfaces for developing Java programs. You can view the latest Java API documentation at https://docs.oracle.com/en/java/javase/16/ Slide 17 JDK JRE JVM
  • 18. Java Programming Language Before We Begin 1. Java Development Kit (JDK) Installation  JDK 16.1 for Windows is available from https://www.oracle.com/java/technologies/javase-jdk16-downloads.html 2. Setting the PATH Environment Variable Slide 18
  • 19. Java Programming Language Creating, Compiling & Executing a Java Program  When you develop a Java application, you typically use a code editor to work with the source code for the application. Files that contain source code have the .java extension.  The Java compiler translates Java source code into a platform- independent format known as Java bytecode. Files that contain Java bytecode have the .class extension.  A Java virtual machine (JVM) includes a Java interpreter that executes Java bytecode. Most modern implementations of the JVM have replaced the Java interpreter with a just-in-time compiler (JIT compiler).  A JIT compiler is similar to an interpreter in some ways, but it improves performance significantly. Slide 19
  • 20. Java Programming Language Programming errors  Programming errors can be categorized into three types: syntax errors, runtime errors, and logic errors.  Syntax errors or compile errors (Result from errors in code construction).  Runtime errors (Errors that cause a program to terminate abnormally. They occur while a program is running if the environment detects an operation that is impossible to carry out).  Logic errors (They occur when a program does not perform the way it was intended to). Slide 20
  • 22. Java Programming Language Compiling and Running Java from Eclipse Java Integrated Development Environments (IDEs)  There are many Java integrated development environments that you can use for Java programming. (NetBeans, Eclipse and IntelliJ) https://www.eclipse.org/downloads/ Slide 22