Introduction to Java-Programming Using Java-Lecture Slides, Slides of Computer Engineering and Programming

This lecture was delivered by Aniruddh Parmar at B. R. Ambedkar Bihar University for Data Transfer Programming course. It includes: Introduction, Java, Computer, Program, Softwares, Instructions, High-level, Languages, Compiling, Source, Code

Typology: Slides

2011/2012

Uploaded on 07/11/2012

dhananad
dhananad 🇮🇳

4

(4)

39 documents

1 / 28

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Advance Computer Programming
Introduction to Java
Docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c

Partial preview of the text

Download Introduction to Java-Programming Using Java-Lecture Slides and more Slides Computer Engineering and Programming in PDF only on Docsity!

Advance Computer Programming

Introduction to Java

Programs

Computer programs , known as software , are

instructions to the computer.

You tell a computer what to do through programs.

Without programs, a computer is an empty machine.

Computers do not understand human languages, so

you need to use computer languages to communicate

with them.

Programs are written using programming languages.

Compiling Source Code

A program written in a high-level language is called a

s ource program. Since a computer cannot

understand a source program. Program called a

compiler is used to translate the source program into

a machine language program called an object

program. The object program is often then linked

with other supporting library code before the object

can be executed on the machine.

Source File (^) Compiler Object File (^) Linker Excutable File

Compiling Java Source Code

You can port a source program to any machine with appropriate compilers. The source program must be recompiled, however, because the object program can only run on a specific machine. Nowadays computers are networked to work together. Java was designed to run object programs on any platform. With Java, you write the program once, and compile the source program into a special type of object code, known as bytecode. The bytecode can then run on any computer with a Java Virtual Machine, as shown in Figure Java Virtual Machine is a software that interprets Java bytecode.

Java Bytecode Java Virtual Machine Any Computer

Java Flow

Why Java?

The answer is that Java enables users to develop and

deploy applications on the Internet for servers, desktop

computers, and small hand-held devices. The future of

computing is being profoundly influenced by the Internet,

and Java promises to remain a big part of that future. Java

is the Internet programming language.

Java is a general purpose programming language.

Java is the Internet programming language.

Examples of Java’s Versatility

Standalone Application: TicTacToe

Applet: TicTacToe

Servlets: SelfTest Web site

Mobile Computing: Cell phones

TicTacToe Standalone

SelfTest Website (using Java Servlets)

PDA and Cell Phone

Characteristics of Java

  • Java Is Simple
  • Java Is Object-Oriented
  • Java Is Distributed
  • Java Is Interpreted
  • Java Is Robust
  • Java Is Secure
  • Java Is Architecture-

Neutral

  • Java Is Portable
  • Java's Performance
  • Java Is Multithreaded
  • Java Is Dynamic

Java is partially modeled on C++, but greatly simplified and improved. Some people refer to Java as "C++--" because it is like C++ but with more functionality and fewer negative aspects.

Characteristics of Java

  • Java Is Simple
  • Java Is Object-Oriented
  • Java Is Distributed
  • Java Is Interpreted
  • Java Is Robust
  • Java Is Secure
  • Java Is Architecture-

Neutral

  • Java Is Portable
  • Java's Performance
  • Java Is Multithreaded
  • Java Is Dynamic

Java is inherently object-oriented. Although many object-oriented languages began strictly as procedural languages, Java was designed from the start to be object-oriented. Object-oriented programming (OOP) is a popular programming approach that is replacing traditional procedural programming techniques.

One of the central issues in software development is how to reuse code. Object- oriented programming provides great flexibility, modularity, clarity, and reusability through encapsulation, inheritance, and polymorphism.

Characteristics of Java

  • Java Is Simple
  • Java Is Object-Oriented
  • Java Is Distributed
  • Java Is Interpreted
  • Java Is Robust
  • Java Is Secure
  • Java Is Architecture-

Neutral

  • Java Is Portable
  • Java's Performance
  • Java Is Multithreaded
  • Java Is Dynamic

You need an interpreter to run Java programs. The programs are compiled into the Java Virtual Machine code called bytecode. The bytecode is machine- independent and can run on any machine that has a Java interpreter, which is part of the Java Virtual Machine (JVM).

Characteristics of Java

  • Java Is Simple
  • Java Is Object-Oriented
  • Java Is Distributed
  • Java Is Interpreted
  • Java Is Robust
  • Java Is Secure
  • Java Is Architecture-

Neutral

  • Java Is Portable
  • Java's Performance
  • Java Is Multithreaded
  • Java Is Dynamic

Java compilers can detect many problems that would first show up at execution time in other languages.

Java has eliminated certain types of error- prone programming constructs found in other languages.

Java has a runtime exception-handling feature to provide programming support for robustness.