Why Java? - PowerPoint PPT Presentation

1 / 21
About This Presentation
Title:

Why Java?

Description:

Why Java? A brief introduction to Java and its features Prepared by Mithat Konar Java is A general purpose, high-level programming language with support for object ... – PowerPoint PPT presentation

Number of Views:66
Avg rating:3.0/5.0
Slides: 22
Provided by: Mithat
Category:

less

Transcript and Presenter's Notes

Title: Why Java?


1
Why Java?
  • A brief introduction to Java and its features

Prepared by Mithat Konar
2
Java is
  • A general purpose, high-level programming
    language with support for object-oriented
    programming.
  • A collection of wide-ranging application
    programming interfaces (APIs).
  • A self-contained runtime system.
  • A complete set of development tools.

3
Java is not
  • An internet-only programming language.
  • Difficult.
  • JavaScript.

4
Javas Main Features
  • Uses virtual machine model to assure true write
    once, run anywhere programs.
  • Built-in support for GUIs.
  • Built-in networking.
  • Built-in security features.
  • Built-in support for multi-threaded programming.
  • Self-documenting.

5
Java applications
  • Applets
  • Stand-alone programs
  • Network servers
  • Network clients
  • Embedded designs
  • Mobile telephones
  • Portable Digital Assistants (PDAs)
  • Set-top boxes
  • Digital Signal Processing (DSP)

6
Java Virtual Machine
  • The conventional compiled-code model

source code
compiler/linker
object code (native)
object code
Microprocessor system
7
Java Virtual Machine
  • The virtual machine model

source code
compiler/linker
bytecode
bytecode
Java Virtual Machine
Microprocessor system
8
Java Virtual MachineAdvantages
  • Compiled bytecode can run without modification on
    any platform that has a Java Virtual Machine.
  • Compile once, run anywhere.

9
Java Virtual Machine Disadvantages
  • Compiled bytecode runs a little slower than
    conventional compiled code.
  • Advances in JVM technology are closing the gap.
  • Not all low-level system manipulations are
    available through standard Java APIs.
  • Low-level system manipulations are available in
    the form of native (non-Java) extensions.

10
Java Language Features
  • Syntax is similar to C.
  • Full support for OOP
  • Classes and objects
  • Information hiding/access control
  • Inheritance, method overriding
  • Polymorphism
  • Abstract methods and classes
  • Interfaces

11
Java Language Features
  • Everything that is not a primitive is an object.
  • No pointers! Objects are accessed through
    reference variables.
  • Built-in memory management and garbage collection.

12
Java API Features
  • Support for the essentials
  • Classes and objects
  • I/O
  • Threads
  • Applet support
  • Conventions used by applets

13
Java API Features
  • Graphic User Interface (GUI) support
  • Abstract Windowing Toolkit (AWT)
  • Windows, dialogs, file dialogs
  • Buttons, checkboxes
  • Menus, menu bars
  • Scrollbars
  • etc.
  • New generation GUI toolkit Swing
  • All the above, plus...
  • Platform independent and run-time changeable
    look-and-feel.
  • And more.

14
Java API Features
  • Networking
  • TCP/IP
  • UDP
  • URLs
  • Internationalization
  • Programs can automatically adapt to specific
    locales and be displayed in the appropriate
    language.

15
Java API Features
  • Security
  • Electronic signatures
  • Public and private key management
  • Access control
  • Certificates
  • Java Database Connectivity (JDBCTM)
  • Provides uniform access to a wide range of
    relational databases.

16
Java API Features
  • The Java platform also has APIs for
  • 2D and 3D graphics
  • Accessibility
  • Servers
  • Collaboration
  • Telephony
  • Speech
  • Animation
  • and more.

17
Benefits of Programming in Java
  • Get started quicklyAlthough the Java programming
    language is a powerful object-oriented language,
    it's easy to learn, especially for programmers
    already familiar with C or C.
  • Write less codeComparisons of program metrics
    suggest that a program written in the Java
    programming language can be four times smaller
    than the same program in C.

18
Benefits of Programming in Java
  • Write better code
  • The Java programming language encourages good
    coding practices.
  • Garbage collection helps you avoid memory leaks.
  • Its object orientation and wide-ranging, easily
    extendible API let you reuse other people's
    tested code and introduce fewer bugs.

19
Benefits of Programming in Java
  • Develop programs fasterDevelopment time may be
    as much as twice as fast compared to writing the
    same program in C because you write fewer lines
    of code and it is a simpler programming language
    than C.

20
Benefits of Programming in Java
  • Avoid platform dependencies.You can keep your
    program portable by avoiding the use of libraries
    written in other languages and native methods.
  • Write once, run anywhere.Because 100 pure Java
    programs are compiled into machine-independent
    bytecodes, they run consistently on any Java
    platform.

21
Benefits of Programming in Java
  • Distribute software more easily.Upgrade applets
    easily from a central server. Applets take
    advantage of the feature of allowing new classes
    to be loaded "on the fly," without recompiling
    the entire program.
Write a Comment
User Comments (0)
About PowerShow.com