Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSCI 212 Object-Oriented Programming in Java. Prerequisite: CSCI 111 variable assignment statement while loop for loop post-increment (i++) strong typing.

Similar presentations


Presentation on theme: "CSCI 212 Object-Oriented Programming in Java. Prerequisite: CSCI 111 variable assignment statement while loop for loop post-increment (i++) strong typing."— Presentation transcript:

1 CSCI 212 Object-Oriented Programming in Java

2 Prerequisite: CSCI 111 variable assignment statement while loop for loop post-increment (i++) strong typing array block {} scope function parameter pre-increment (++i) recursion

3 Why Java? Write Once; Run Anywhere? C++ Source Code Executable Binary Code for Windows hardware C++ Compiler for Windows C++ Compiler for iOS Executable Binary Code for Apple hardware Executable Binary Code for other hardware C++ Compiler for other hardware

4 Write Once; Run Anywhere! Java Source Code Java “Bytecode” Java Compiler for Windows Java Compiler for iOS Java “Bytecode” Java Compiler for other hardware Java Virtual Machine “JVM” Java Virtual Machine “JVM” Java Virtual Machine “JVM”

5 The JDK and the JRE API – Application Program Interface Class libraries (MATH, GUI, Database…) JRE – Java Runtime Environment JVM plus API (can run Java programs) JDK- Java Development Kit JRE plus compiler, javadoc, … For CSCI 212 you need the JDK

6 Java Source Code Java “Bytecode” Java Compiler for Windows HelloWorld.java >javac HelloWorld.java HelloWorld.class >java HelloWorld JRE

7 Ada Source Code Java “Bytecode” Ada Compiler for Windows Executable Binary Code for Windows hardware JRE

8 The Java Virtual Machine ensures a program will run the same way on any computer My biggest integer is 999,999,999,999,999,999! My biggest integer is 999,999,999!

9 When running on Native Hardware you are dependent on the machine's architecture My biggest integer is 999,999,999,999,999,999! My biggest integer is 999,999,999! int salary = 999,999,999,999,999,999;

10 The JVM Levels the Playing Field My biggest integer is 999,999,999,999,999,999! My biggest integer is 999,999,999! int salary = 999,999,999,999,999,999; JVM The biggest Java integer is 2,147,483,647 int salary = 1,999,999,999;


Download ppt "CSCI 212 Object-Oriented Programming in Java. Prerequisite: CSCI 111 variable assignment statement while loop for loop post-increment (i++) strong typing."

Similar presentations


Ads by Google