You are on page 1of 30

Introduction to Java

{ January 30, 2014


Types of Languages
{ Introduction to Java
 Hundreds of computer languages are in use
today.

 3 Types
 Machine Language
 Assembly Language
 High-level languages

Types of Languages
 Considered as the “natural language” of a computer

 Consists of strings of numbers that instruct


computers to perform most elementary operation
one at a time.

 Machine dependent

 Tedious for most programmers

Machine Language
 Programmers began using English-like
abbreviations to represent elementary
Operations

 Assemblers
 Translator programs that converts assembly
language programs to machine language

Assembly Language
 Developed to speed up the programming
process

 Enables programmer to accomplish multiple


tasks with just a single statement.

High-level Language
 Compilers
 Converts high-level language programs into
machine language

 Allows programmers to write instructions that


look almost like everyday English and contain
common mathematical notations.

High-level Language
 Interpreter program
 Developed to execute high-level language
programs directly
 Drawback: SLOWER

High-level Language
History of Java
{ Introduction to Java
 Microprocessor revolution’s most important
contribution made the possibility of development of
PC.

 It had impact in intelligent consumer-electronic


devices

 Sun Microsystem in 1991 funded an internal


corporate research code-named Green

History of Java
 Headed by James Gosling

 They named it as Oak after an oak tree outside


his window at Sun.

 A group of Sun people visited a local coffee


shop, the name Java was suggested

History of Java
 The project ran into some difficulties in 1990s

 By good fortune, the World Wide Web


exploded in popularity 1993 and they saw the
potential of Java to add dynamic content
(interactivity and animations )

History of Java
 Sun formally announced Java at an industry
conference in May 1995.

 Garnered the attention of business community


 Large-scale enterprise applications
 To enhance the functionality of web servers
 To provide applications for consumer devices

History of Java
Java Class
Libraries
{ Introduction to Java
 Java programs consists of pieces called classes.

 Classes include pieces called methods that


perform tasks or return information.

 Java Application Programming Interfaces (API)

Java Class Libraries


Typical Java
Development
Environment
{ Introduction to Java
 Edit
 Compile
 Load
 Verify
 Execute

Typical Java Development


Environment
Typical Java Development
Environment
Typical Java Development
Environment
Typical Java Development
Environment
Typical Java Development
Environment
Java Programming
{ Introduction to Java
Java Programming
 Compile: javac FileName.java
 Example: java Welcome1.java

 Run: java FileName


 Example: java Welcome1

Java Programming
Java Programming
Java Programming
Java Programming
Java Programming
 Data Types
 int
 long
 float
 double
 boolean
 char

Java Programming

You might also like