Download Adv. OOP Lecture 1-Intro to Java

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Advanced OOP MCS-3
OOP
BSCS-3
Lecture # 1
Compulsory Reading Material
• Java; How to Program (9th Edition) by
Paul Deitel & Harvey Deitel
Characteristics Of Java
•
•
•
•
•
•
•
•
•
•
•
Java Is Simple
Java Is Object-Oriented
Java Is Distributed
Java Is Interpreted
Java Is Robust
Java Is Secure
Java Is Architecture-Neutral
Java is Portable / Platform Independent
Java's Performance
Java Is Multithreaded
Java Is Dynamic
JDK Versions
A Java Development Kit (JDK) is a program development environment for writing Java applets and applications.
• JDK 1.02 (1995)
• JDK 1.1 (1996)
• JDK 1.2 (1998)
•
•
•
•
•
JDK 1.3 (2000)
JDK 1.4 (2002)
JDK 1.5 (2004) a. k. a. JDK 5 or Java 5
JDK 1.6 (2006) a. k. a. JDK 6 or Java 6
JDK 1.7 (possibly 2010) a. k. a. JDK 7 or Java 7
JDK Editions
• Java Standard Edition (J2SE)
• J2SE can be used to develop client-side standalone applications or applets.
• Java Enterprise Edition (J2EE)
• J2EE can be used to develop server-side applications such as Java servlets
and Java ServerPages.
• Java Micro Edition (J2ME).
• J2ME can be used to develop applications for mobile devices such as cell
phones.
Which Java?
•Java 6+ JDK (Java Development Kit), Standard Edition includes:
• JDK (Java development kit) – for developing Java software (creating Java
programs.
• JRE (Java Runtime environment) – only good for running pre-created Java
programs.
• Java Plug-in – a special version of the JRE designed to run through web browsers.
• A plug-in is a software component that adds a specific feature to an existing software
application.
• Most latest JDK and its documentation can be downloaded from:
• http://www.oracle.com/technetwork/java/javase/downloads/index.html
Popular Java IDEs
• NetBeans; Open Source by Sun
• Eclipse; Open Source by IBM
• Borland Jbuilder
• BlueJ
• Jcreator
• IntelliJ IDEA
• Dr. Java
Java Vs. Java Script
• Java is an OOP programming language while Java Script is an OOP scripting
language.
• Java creates applications that run in a virtual machine or browser while
JavaScript code is run on a browser only.
• A Java virtual machine (JVM) is a virtual machine that can execute Java
bytecode. It is the code execution component of the Java platform.
• In a sense, JVM is both an interpreter and a compiler, but not purely.
• Java code needs to be compiled while JavaScript code are all in text.
• They require different plug-ins.
A High Level View Of
Translating/Executing Java Programs
Traditional
Compiled
Program
Java
Program
• The Java development environment has two parts: a Java compiler and a Java
interpreter.
• The Java compiler takes your Java program and instead of generating machine codes
from your source files, it generates bytecodes.
• To run a Java program, you run a program called a bytecode interpreter, which in turn
executes your Java program
A High Level View Of
Translating/Executing Java Programs
Stage 1: Compilation
Filename.java
Java program
Java compiler
(javac)
Filename.class
Java
bytecode
(generic
binary)
Bytecodes are a set of instructions that looks a lot like some machine codes, but that is not
specific to any one processor.
A High Level View Of
Translating/Executing Java Programs
Stage 2: Interpreting and executing the byte code
Machine language
instruction (UNIX)
Filename.class
Java
bytecode
(generic
binary)
Java interpreter
(java)
Machine language
instruction (Windows)
Machine language
instruction (Apple)
Assignment # 1
• Find out the Difference b/w Java & other programming languages.
• What is the connection between ORACLE and Java?
• Write your name with asterisks.
GOOD LUCK !
☻