java01 - Introduction to Java CS 331 Introduction Present...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
Introduction to Java CS 331
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Introduction Present the syntax of Java Introduce the Java API Demonstrate how to build stand-alone Java programs Java applets, which run within browsers e.g. Netscape Example programs
Background image of page 2
Why Java? It’s the current “hot” language It’s almost entirely object-oriented It has a vast library of predefined objects and operations It’s more platform independent this makes it great for Web programming It’s more secure It isn’t C++
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Applets, Servlets and Applications An applet is designed to be embedded in a Web page, and run by a browser Applets run in a sandbox with numerous restrictions; for example, they can’t read files and then use the network A servlet is designed to be run by a web server An application is a conventional program
Background image of page 4
Building Standalone JAVA Programs (on UNIX) Prepare the file foo.java using an editor Invoke the compiler: javac foo.java This creates foo.class Run the java interpreter: java foo
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
The .class files generated by the compiler are not executable binaries so Java combines compilation and interpretation Instead, they contain “byte-codes” to be executed by the Java Virtual Machine other languages have done this, e.g. UCSD Pascal
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 05/06/2010 for the course CS 324 taught by Professor Prof.rama during the Spring '10 term at Lamar University.

Page1 / 22

java01 - Introduction to Java CS 331 Introduction Present...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online