Why Java is Portable - PowerPoint PPT Presentation

About This Presentation
Title:

Why Java is Portable

Description:

Java is a programming language that produces software for multiple platforms. – PowerPoint PPT presentation

Number of Views:79
Slides: 9
Provided by: dhekitha
Tags: java

less

Transcript and Presenter's Notes

Title: Why Java is Portable


1
Why Java is Portable
  • https//www.besanttechnologies.com/training-course
    s/java-training

2
Java
  • Java is a programming language that produces
    software for multiple platforms.
  • When a programmer registers a Java application,
    compiled code (known as bytecode) runs on most
    operating systems (OS), including Windows, Linux,
    and Mac. Java derives much of its syntax from C
    and C programming languages.
  • Java is only Indonesia's fourth largest island,
    but contains more than half of the country's
    population and dominates it politically and
    economically.

3
Features of Java
  • The main reason behind the creation of Java was
    to bring portability and security functionality
    to a computer language.
  • In addition to these two main features, there
    were many other features that played an important
    role in shaping the final form of this excellent
    language, and therefore one of the reasons for
    Java security.
  • Of course, every time javacode is compiled, the
    compiler generates a byte code.

4
Java is a portable
  • The idea is that the Java language is portable
    (or, more accurately, compiled byte code is
    portable). You are sure that each VM requires a
    specific implementation for a specific hardware
    profile.
  • However, once this effort has been made, all Java
    byte code will be executed on this platform.
  • Java source code is compiled in bytecode when
    using the javac compiler. The bytecode is saved
    to disk with the file extension .class.

5
Java is a portable
  • The Java platform differs from most other
    platforms in that it is a software-based platform
    that runs on other hardware-based platforms. It
    has two components
  • 1. Runtime environment
  • 2. API (Application Programming Interface)
  • Java code can run on various platforms, for
    example, Windows, Linux, Sun Solaris, Mac / OS,
    etc.

6
Language using Java
  • The Java compiler provided by Oracle is written
    in Java. Basically, Java is using C through the
    native Java API.
  • You can check the source code of any class in
    Java as the Object class and check if you want to
    use the C language they called api native in
    java.
  • Java runs on the JVM virtual machine - java.
    "Write Once, Turn Anywhere" (WORA) or sometimes
    "Write Once, Turn Anywhere" (WORE) was a motto
    created by Sun Microsystems to illustrate the
    benefits of the Java cross platform.

7
Java provides three distinct types of portability
  • Source code portability A given Java program
    must produce identical results, CPU, operating
    system, or underlying Java compiler.
  • CPU architecture portability Today's Java
    compilers produce object code (called byte code)
    for a CPU that doesn't exist yet. For each actual
    CPU on which Java programs are to be executed, a
    Java interpreter or virtual machine executes code
    J.
  • OS / GUI Java solves this problem by providing a
    set of library functions (contained in libraries
    provided by Java, such as awt, util, and lang)
    that converge with an imaginary operating system
    and an imaginary GUI.

8
Java program structure
  • Java program structure is the standard format
    released by the language developer for the
    industry programmer .
  • Sun Micro System has prescribed the following
    structure for Java programmers for the
    development of Java applications. A package is a
    collection.
  • The Java data structure is technically
    different than the C and Pascal versions, because
    the Java data structure is a Class instead of
    a struct or a record. Now it has private data and
    public methods.
Write a Comment
User Comments (0)
About PowerShow.com