Presentation is loading. Please wait.

Presentation is loading. Please wait.

Java -- A very Hot Object- Oriented Language Instructors: Fu-Chiung Cheng ( 鄭福炯 ) Associate Professor Computer Science & Engineering Tatung Institute of.

Similar presentations


Presentation on theme: "Java -- A very Hot Object- Oriented Language Instructors: Fu-Chiung Cheng ( 鄭福炯 ) Associate Professor Computer Science & Engineering Tatung Institute of."— Presentation transcript:

1 Java -- A very Hot Object- Oriented Language Instructors: Fu-Chiung Cheng ( 鄭福炯 ) Associate Professor Computer Science & Engineering Tatung Institute of Technology

2 Outline Why Java is HOT? What is Java? What is New? (Java vs C++/C)

3 Why Java is HOT? Write Once, Run Anywhere model. Network-Centric Computing (internet programming) Interactive Content and Animation (multithreading) support APIs for both client & server applications Near guarantee that you can‘t run a bad program. WWW + Java gives the world a new way to think.

4 What is Java? Simple (compared to C++) Ture object-Orentied programming Distributed Robust Secure Archetectural Neutral Multithreaded

5 What is New? No global variables -- package.class.field No preprocessor -- import statement Unicode No pointers Garbage Collection Array and String are first class objects No goto statement Single Inheritance Java documentation generator Applet with Web browsers

6 What is New? Java documentation Rich Libraries: A. 2D, 3D programming model B. 2D animation API for video game C. API for time-critical audio, vidio and MIDI data D. Multithreading E. Networking F. Security G. Exception handling ….

7 What is New? C++/C Compilation, linking & loading: C++ Program C++ Program MAC PC Sun Compiler MAC Binary File PC Sun MAC PC Sun linker & Loader

8 What is New? Java Compilation, linking, loading & verifying & JVM: Java Program Java Program MAC PC Sun Compiler MAC PC Sun Interpreter JVM Java ByteCode Java ByteCode

9 How Java Works? Java Program Java Program Java Compiler Java Compiler Loader Verifier JVM Java ByteCode Java ByteCode Network or File System Network or File System HARDWAREHARDWARE

10 Java Programs Java standalone applications: Fully access your system resources (e.g. read/write files). Java applets: No read/write access Can not standalone, Need browsers (appletviewer, Netscape, IE).

11 Java Standalone Applications Public class HelloWeb { public static void main(String args[]) { System.out.println(“Hello Web!”); } Compilation: javac HelloWeb.java ==> HelloWeb.class Execution: java HelloWeb

12 Java Applets Public class HelloWebApplet extend java.applet.Applet { public void paint(java.awt.Graphs g) { g.drawString(“Hello Web!”, 125, 95); } HTML: Hello Web Applet Example

13 Conclusions Java is a pure OO programming language Cross-platform applications (Write Once Run Anywhere) WWW + Java gives the world a new way to think.


Download ppt "Java -- A very Hot Object- Oriented Language Instructors: Fu-Chiung Cheng ( 鄭福炯 ) Associate Professor Computer Science & Engineering Tatung Institute of."

Similar presentations


Ads by Google