Introduction to Java
Introduction to Computers and Computer
Programming
• Computer Program:
• Computer Programming Process:
• Programming Languages:
1.Assembly Language
2.A high-level language
History of Programming Languages:
Assembler, Compiler, Linker, Loader, Interpreter:
Computer Components:
History of Programming Languages: (only major languages are listed)
• 1951 - Assembly Language
• 1954 - FORTRAN
• 1958 - LISP
• 1958 - ALGOL
• 1959 - COBOL
• 1964 - BASIC
• 1964 - PL/I
• 1970 - Pascal
• 1972 - C
• 1978 - SQL (query language)
• 1980 - C++
• 1984 - MATLAB
• 1990 - Python
• 1993 - R
• 1995 - Java
• 1995 - PHP
• 2002 - Scratch
History and Structure of Java
• Java is an object-oriented programming language. Java
was developed by James Gosling and colleagues at Sun
Microsystems in the early 1990s.
• It was developed to provide a platformindependent
programming language.
• The first public implementation was Java 1.0 in 1995.
• It made the promise of "Write Once, Run Anywhere", with
free runtimes on popular platforms.
Structure of Java:
• Java programs consists of pieces called classes.
• Objects are instances of classes. From the same class,
many objects can be created. An objectoriented program
may contain many objects from various classes.
• Classes contain attributes and methods.
• Attributes contain data of object. Methods perform actions
related with objects.
• Java has rich collections of existing classes in the Java
Class Libraries which are also known as the Java API's
(Application Programming Interfaces).
• To write Java programs, one has to learn:
• a) the Java language itself (the syntax, the constructs),
• b) the classes in the Java Class Libraries,
• c) to write new classes.
Java programs go through five phases:
1. Edit: create Java program using an editor and store on disk in a file ending
with .java.
2. Compile: bytecodes are created and stored on disk in a file ending with .class.
3. Load: bytecodes are taken from the disk and stored in the memory.
4. Verify: check that all bytecodes are valid, and ensure that the bytecode does
not violate Java's security restrictions.
5. Execute: JRE (Java Runtime Engine) reads bytecodes, translates them into
instructions that the computer can understand and runs these machine
instructions.
• The Java Development Kit (JDK)
1.Java Runtime Environment (JRE)
2.An interpreter/loader(java)
3.A compiler (javac)
4.An archiver (jar)
5.A documentation generator (javadoc) and other tools needed in Java
development
• JDK can be downloaded from
https://www.oracle.com/technetwork/java/javase/downloads/index.html.

Introduction to Java(1) - CPPT+opy.Jpptx

  • 1.
    Introduction to Java Introductionto Computers and Computer Programming
  • 2.
    • Computer Program: •Computer Programming Process: • Programming Languages: 1.Assembly Language 2.A high-level language History of Programming Languages: Assembler, Compiler, Linker, Loader, Interpreter: Computer Components:
  • 3.
    History of ProgrammingLanguages: (only major languages are listed) • 1951 - Assembly Language • 1954 - FORTRAN • 1958 - LISP • 1958 - ALGOL • 1959 - COBOL • 1964 - BASIC • 1964 - PL/I • 1970 - Pascal • 1972 - C • 1978 - SQL (query language) • 1980 - C++ • 1984 - MATLAB • 1990 - Python • 1993 - R • 1995 - Java • 1995 - PHP • 2002 - Scratch
  • 4.
    History and Structureof Java • Java is an object-oriented programming language. Java was developed by James Gosling and colleagues at Sun Microsystems in the early 1990s. • It was developed to provide a platformindependent programming language. • The first public implementation was Java 1.0 in 1995. • It made the promise of "Write Once, Run Anywhere", with free runtimes on popular platforms.
  • 5.
    Structure of Java: •Java programs consists of pieces called classes. • Objects are instances of classes. From the same class, many objects can be created. An objectoriented program may contain many objects from various classes. • Classes contain attributes and methods. • Attributes contain data of object. Methods perform actions related with objects.
  • 6.
    • Java hasrich collections of existing classes in the Java Class Libraries which are also known as the Java API's (Application Programming Interfaces). • To write Java programs, one has to learn: • a) the Java language itself (the syntax, the constructs), • b) the classes in the Java Class Libraries, • c) to write new classes.
  • 7.
    Java programs gothrough five phases: 1. Edit: create Java program using an editor and store on disk in a file ending with .java. 2. Compile: bytecodes are created and stored on disk in a file ending with .class. 3. Load: bytecodes are taken from the disk and stored in the memory. 4. Verify: check that all bytecodes are valid, and ensure that the bytecode does not violate Java's security restrictions. 5. Execute: JRE (Java Runtime Engine) reads bytecodes, translates them into instructions that the computer can understand and runs these machine instructions.
  • 8.
    • The JavaDevelopment Kit (JDK) 1.Java Runtime Environment (JRE) 2.An interpreter/loader(java) 3.A compiler (javac) 4.An archiver (jar) 5.A documentation generator (javadoc) and other tools needed in Java development • JDK can be downloaded from https://www.oracle.com/technetwork/java/javase/downloads/index.html.