CS2_04_IntroToJava

CS2_04_IntroToJava - CS2 Module 4 Category: Elements of...

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

View Full Document Right Arrow Icon
CS2 Module 4 Category: Elements of Java Topic: Introduction Objectives First look at elements of Java
Background image of page 1

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

View Full DocumentRight Arrow Icon
CS 2 Introduction to Object Oriented Programming Module 4 Elements of Java Introduction
Background image of page 2
Introduction to Java What Java is: A tool for programming well Portable across any hardware platform that has a JVM interpreter Relatively easy to learn if you have a good foundation An object-oriented language What Java is not: “The Ultimate Programming Language” HTML or another web-content language Only useful for web applets J ust A nother V acuous A cronym
Background image of page 3

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

View Full DocumentRight Arrow Icon
Introduction to Java (cont’d) Strengths of Java: A real language, in demand in industry Portability Comparatively easy to learn Difficult to destroy a machine with it ;-) Advanced built-in GUI/Graphics features Weaknesses of Java: Slow: interpreted and OO GUI/Graphics via “Least Common Denominator” approach (due to platform independence) Sometimes awkward/annoying syntax obscures some concepts and principles
Background image of page 4
Compiling vs. Interpreting Originally computers programmed in machine language Major advance Allow humans to write programs in "understandable" language Translation into instructions the machine could understand
Background image of page 5

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

View Full DocumentRight Arrow Icon
Compiling vs. Interpreting Compiling Programmer writes program in high level language Program called a compiler translates this into language of the computer Advantage The machine language program is usually fast Disadvantage The process is difficult and time consuming
Background image of page 6
Compiling vs. Interpreting Interpreting Programmer writes program in high level language During execution one line at a time in translated and executed Advantage Program development process may be quicker and more interactive Disadvantage Often program execution is slow
Background image of page 7

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

View Full DocumentRight Arrow Icon
Translation Compilation Fortran Cobol Pascal Algol C/C++ Interpretation Basic Lisp Scheme Java?
Background image of page 8
Emulation How to sell a new computer to someone with lots of software? Emulate the old hardware! Old Software New Computer Program Emulating Old Computer
Background image of page 9

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

View Full DocumentRight Arrow Icon
The Java Approach Compilation into ByteCode Java Source Byte Code Javac Compiler
Background image of page 10
The Java Approach Interpretation by the Java Virtual Machine Any Computer Java Virtual Machine Byte Code
Background image of page 11

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

View Full DocumentRight Arrow Icon
The whole picture? Any
Background image of page 12
Image of page 13
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 44

CS2_04_IntroToJava - CS2 Module 4 Category: Elements of...

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

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