Topic1 - Intro to Java

download Topic1 - Intro to Java

of 14

Transcript of Topic1 - Intro to Java

  • 8/3/2019 Topic1 - Intro to Java

    1/14

    Topic 1

    Introduction to Java

    Syaifulnizam Abd ManafM. IT (Computer Science), UKM

    B. Eng Computer Engineering, UTM

    Email: [email protected]

  • 8/3/2019 Topic1 - Intro to Java

    2/14

    Learning Outcomes When you have completed this topic you

    will be able to:

    Describe the Java environment

    Describe the strength of Java

    Explain the types of Java program

    Compile and execute a Java program

  • 8/3/2019 Topic1 - Intro to Java

    3/14

    Oscar Nierstrasz 1.3

    History

  • 8/3/2019 Topic1 - Intro to Java

    4/14

    Introduction

    Starting from a failed project, Java has emerged as apopular programming language within a short period oftime.

    JavaSoft Sun MicroSystems had successfully signed up 38licenses in only one year after the Java technology wasannounced.

    Besides, it also successfully attracted 6000 programmers toattend the first seminar - JavaOne Developer

    ConferenceTM in 1996. What is so special in Java that computer industries andbusinesses can accept it within a very short period of timecompared to other new technologies in the computerhistory?

  • 8/3/2019 Topic1 - Intro to Java

    5/14

    Traditional Environment vs

    Java Environment

  • 8/3/2019 Topic1 - Intro to Java

    6/14

    Advantages of Using Bytecodes

    Using bytecode as an intermediate and not allowing eachperson compile it into the machine language of whatevercomputer they want to run give us advantages.

    A compiler has to understand Java in order to compile it. Compiler, on the other hand, is a complex program.

    A Java bytecode interpreter, on the other hand, is a simpleprogram.

    This makes it easy to write a bytecode interpreter for a new

    type of computer; once that is done, that computer can runany compiled Java program.

    It would be much difficult to write a Java compiler for thesame computer.

  • 8/3/2019 Topic1 - Intro to Java

    7/14

    Characteristics of Java Simple

    Object Oriented

    Platform Independent

    Safe

    H

    igh Performance Multi-threaded

  • 8/3/2019 Topic1 - Intro to Java

    8/14

    Tool to Develop Java Programs When Java was introduced in 1995, JDK was the only development tool available.

    Although what is provided in JDK is sufficient to develop any Java program, thefacilities provided for the programmer are outdated compared to the latestintegrated development environment for languages such as Visual Basic and C++.

    Integrated Development Environment (IDE) refers to the software package thatcombines various development tools.

    This includes program editor, compiler, debugger and other utilities.

    Most IDE has features such as windows, drag-anddrop, and other graphicelements.

    The aim is to make the software development process fast, efficient, and easy todebug.

    Part of IDE uses the Rapid Applicatio

    nDevelopme

    nt (R

    AD) approach. RAD accelerates the software development process by using tools such as the

    interface designer.

    Many of the Java IDE available in the market uses the graphical interface tosupport RAD.

  • 8/3/2019 Topic1 - Intro to Java

    9/14

    Some JavaIDE Software

    The following are some Java IDE software with theirURLs:

    WinEdit (http://www.winedit.com/)

    Jcreator (http://www.jcreator.com)

    Java Web IDE (http://www.chami.com/webide)

    Symantec Caf/Visual Caf (http://www.symantec.com/)

    Forte for Java (http://www.sun.com/forte/ffj/)

    Microsoft Visual J++ (http://www.microsoft.com/java/sdk)

    Visual Age (http://www-4.ibm.com/software/ad/vajava/)

  • 8/3/2019 Topic1 - Intro to Java

    10/14

    Writing Java Programs

  • 8/3/2019 Topic1 - Intro to Java

    11/14

    Java applications

    stand-alone programs that run on you own

    computer

    can read and write data on your disk disk

    applets

    executed from within a browser window (e.g.

    Netscape or Internet Explorer) can be loaded from the World Wide Web and

    executed on another computer

    cannot read or write data on your hard disk

  • 8/3/2019 Topic1 - Intro to Java

    12/14

    Structured Approach vs Object

    Oriented Approach

  • 8/3/2019 Topic1 - Intro to Java

    13/14

    Writing and RunningApplets

  • 8/3/2019 Topic1 - Intro to Java

    14/14

    Java Application and Applet

    Summary