Presentation is loading. Please wait.

Presentation is loading. Please wait.

CPRG 215 Introduction to Object-Oriented Programming with Java Module 1-Introduction to Java Topic 1.1 Basics of Java Produced by Harvey Peters, 2008 Copyright.

Similar presentations


Presentation on theme: "CPRG 215 Introduction to Object-Oriented Programming with Java Module 1-Introduction to Java Topic 1.1 Basics of Java Produced by Harvey Peters, 2008 Copyright."— Presentation transcript:

1 CPRG 215 Introduction to Object-Oriented Programming with Java Module 1-Introduction to Java Topic 1.1 Basics of Java Produced by Harvey Peters, 2008 Copyright SAIT

2 Please read the following sections in your textbook Core Java, Volume I–Fundamentals, Eighth Edition (By Cay S. Horstmann & Gary Cornell) Chapter 1 - An Introduction to Java Java As a Programming Platform The Java "White Paper" Buzzwords Java Applets and the Internet A Short History of Java Common Misconceptions about Java CPRG 215 Module 1.2- Getting the Tools and Setting Up the Development Machine Copyright SAIT

3 What is Java? Object-oriented Distributed Portable/Architecture-neutral Reliable Secure Multi-threaded Dynamic –no link step - run-time flexibility CPRG 215 Module 1.1- Basics of Java Copyright SAIT Topic 1.1.1

4 What is Java? Programming Language Development Environment Application Environment Deployment Environment CPRG 215 Module 1.1- Basics of Java Copyright SAIT Topic 1.1.1

5 Characteristics of Java Java is compiled to “bytecode” –Not binary like most compiled languages Bytecode is interpreted by the Java Virtual Machine (JVM) Performance –JVM is optimized -- speed approaching that of C++ Optimization –JVM optimized for hardware and operating system Portability –Java programs run on JVM, isolated from hardware & operating system – platform independent CPRG 215 Module 1.1- Basics of Java Copyright SAIT Topic 1.1.2

6 Java Compared to C++ C++ –Performance Used when high speed is required –Control Tight control over memory usage Java –Portability Can run on any JVM (some version issues though) –Reliability Exception handling reduces crashes –Security Built-in security eliminates problems of other languages CPRG 215 Module 1.1- Basics of Java Copyright SAIT Topic 1.1.3

7 JVM Java Virtual Machine (JVM) Layer between Java code and hardware Bytecode interpreter Can be software or can be built-in to the hardware Part of the development tool or the Web browser Buffer between program and platform –Platform independence CPRG 215 Module 1.1- Basics of Java Copyright SAIT Topic 1.1.4 Hardware O/S JVM Java Program

8 JVM Bytecode –machine-code instructions –checked by compiler –must be able to run on any Java compliant interpreter CPRG 215 Module 1.1- Basics of Java Copyright SAIT Topic 1.1.4

9 JVM Garbage collection –memory allocated by assigning a pointer to the memory address –most languages require program to clean-up and free its memory when complete leads to memory leaks if not handled correctly –Java automatically manages this CPRG 215 Module 1.1- Basics of Java Copyright SAIT Topic 1.1.4

10 JVM Security –Security Manager built into JVM –Provides cryptography, authentication & authorization, public key architecture –“customizable sandbox” Security policy can be customized for fine- grained control –Language security Strong data typing Automatic memory management Bytecode verification Secure class loading –Prevents memory violations, buffer overflows, and more CPRG 215 Module 1.1- Basics of Java Copyright SAIT Topic 1.1.4


Download ppt "CPRG 215 Introduction to Object-Oriented Programming with Java Module 1-Introduction to Java Topic 1.1 Basics of Java Produced by Harvey Peters, 2008 Copyright."

Similar presentations


Ads by Google