JAVA-ch1
JAVA-ch1
Abey B. (MSc.)
Basic Concepts
▶ Introduction to programming
▶ Basics of programming
▶ Overview of OO principles
▶ Overview of Java Programming
▶ Types of Java Program
▶ Java Application
What is Computer?
Computer is an electronic device that accepts data, performs
computations, and makes logical decisions according to instructions
that have been given to it;
▶ Then produces meaningful information in a form that is useful to the
user.
A computer is an electronic device that manipulates information, or
data.
It has the ability to store, retrieve, and process data.
Definition
Computer Programs, Software Programs, or just Programs is
instructions that tells the computer what to do.
Computer programming is the process that professionals use to write
code that instructs how a computer, application or software program
performs.
Writing computer programs means writing instructions
▶ That will make the computer follow and run a program based on
those instructions.
Low-level Languages
Computers only understand one language and that is binary language
or the language of 1s and 0s.
All the instructions were given in binary form.
Although the computer easily understood these programs,
▶ It proved too difficult for a normal human being to remember all
the instructions in the form of 0s and 1s.
▶ Low-level Languages is a type of language, which is machine
friendly.
▶ Two common types of low-level programming languages are assembly
language and machine language.
High-level languages
A high-level language is any programming language that enables
development of a program in a much more user-friendly
programming context
High-level language is generally independent of the computer’s
hardware architecture.
High-level language does not require addressing hardware
constraints when developing a program.
High-level languages also require translation to machine language
before execution.
High-level languages
This translation is accomplished by either a compiler or an interpreter.
▶ Compiler
⋆ Compilers translate the entire source code program before execution.
▶ Interpreters
⋆ Interpreters translate source code programs one line at a time.
What is Java?
Java is a programming language.
java is a high level, robust, object-oriented and secure
programming language.
Java is a powerful general-purpose programming language.
▶ It is used to develop desktop and mobile applications, big data
processing, and so on.
Java is one of the most popular programming languages.
▶ Because,according to Oracle, Java runs on 3 billion devices
worldwide
What is Java?
The Java language is object-oriented and programs written in
Java are portable
▶ That is, they can be run on many different platforms
Java is different from other programming languages because a
Java program is compiled and interpreted
▶ In many other languages, the program is either compiled or
interpreted.
The Java compiler translates the program into an intermediate
language called Java bytecodes.
bytecode
What is Java?
Compilation only needs to happen one time, whereas
interpretation happens every time the program is executed.
The source code for a Java program is saved to one or more .java
files.
▶ The compiler generates a .class file for each .java file
A .java file can be opened and viewed in any text editor
▶ But a .class file is bytecode so it cannot be viewed in the same way
Web Application
▶ An application that runs on the server side and creates a dynamic
page is called a web application.
Question
Many Thanks!