Java - PowerPoint PPT Presentation

1 / 8
About This Presentation
Title:

Java

Description:

CIS 181. Java. Java Characteristics. Object-Oriented. Distributed. Platform Independent ... Application which can be run by the user on a given machine ... – PowerPoint PPT presentation

Number of Views:1184
Avg rating:3.0/5.0
Slides: 9
Provided by: richardu
Category:

less

Transcript and Presenter's Notes

Title: Java


1
Java
2
Java Characteristics
  • Object-Oriented
  • Distributed
  • Platform Independent

3
Program Execution
Java Source Code
Java Compiler
Java byte-code
Byte-code interpreter
Byte-code compiler
Java chip
JVM
JVM
4
JVM
  • Uses multiple 32-bit registers.
  • program counter
  • reference to operand stack
  • reference to local variables
  • reference to activation frames
  • Garbage collected heap for storage of run-time
    objects.

5
Java Programs
  • Applets
  • Embedded in web pages, invoked when web page is
    loaded.
  • Apps
  • Application which can be run by the user on a
    given machine (requires JRE).

6
Applet Security
  • Shielded Memory Addresses
  • Verification of Byte-code
  • Run-time security manager

7
Applet
  • /
  • Trivial applet that displays a string - 4/96 PNL
  • /
  • import java.awt.
  • import java.applet.Applet
  • public class TrivialApplet extends Applet
  • public void init()
  • repaint()
  • public void paint( Graphics g )
  • g.drawString( "Hello World!", 30, 30 )

8
App
  • /
  • Trivial application that displays a string -
    4/96 PNL
  • /
  • public class TrivialApplication
  • public static void main(String args)
  • System.out.println( "Hello World!" )
Write a Comment
User Comments (0)
About PowerShow.com