SlideShare a Scribd company logo
2
Most read
4
Most read
5
Most read
CS3135/CS2135
Object Oriented Programming (Java)
BSCS-3 / MCS-3
Lecture # 1
Intro to Java
Compulsory Reading Material
Java; How to Program (9th Edition) by
Paul Deitel & Harvey Deitel
ASSESSMENT & EVALUATION CRITERIA
• Quizzes 5 %
• Assignments 10 %
• Mid Term 20 %
• Project 15 %
• Final Term 50 %
• Total:
100 %
2
Instructor: Tanzila Kehkashan
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
3
Instructor: Tanzila Kehkashan
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
4
Instructor: Tanzila Kehkashan
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.
5
Instructor: Tanzila Kehkashan
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
6
Instructor: Tanzila Kehkashan
Popular Java IDEs
• NetBeans; Open Source by Sun
• Eclipse; Open Source by IBM
• Borland Jbuilder
• BlueJ
• Jcreator
• IntelliJ IDEA
• Dr. Java
7
Instructor: Tanzila Kehkashan
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.
8
Instructor: Tanzila Kehkashan
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
Traditional
Compiled
Program
Java
Program
9
Instructor: Tanzila Kehkashan
A High Level View Of
Translating/Executing Java Programs
Java compiler
(javac)
Java program
Filename.java
Java
bytecode
(generic
binary)
Filename.class
Stage 1: Compilation
Bytecodes are a set of instructions that looks a lot like some machine codes, but that is not
specific to any one processor.
10
Instructor: Tanzila Kehkashan
A High Level View Of
Translating/Executing Java Programs
Java interpreter
(java)
Java
bytecode
(generic
binary)
Filename.class
Machine language
instruction (UNIX)
Machine language
instruction (Windows)
Machine language
instruction (Apple)
Stage 2: Interpreting and executing the byte code
11
Instructor: Tanzila Kehkashan
First Program in Java
public class bscsfirst
{
public static void main(String[] args)
{
System.out.println(“Hello BSCS”);
}
}
12
Instructor: Tanzila Kehkashan
TOPICS TO COVER
• http://docs.oracle.com/javase/7/docs/api/overview-summary.html
• 2 types of Comments
• Difference b/w print & println
• Escape Sequence
• Use of printf
• Variable declaration and types
• Primitive data types
• Class name
• An array
13
Instructor: Tanzila Kehkashan
Topics To Cover
• Arithmetic operators (+, -, /, *, %)
• Relational operators (==, !=, >, <, >=, <=)
• Class declaration
• Compiling an application with multiple classes
• javac file1.java file2.java
• javac *.java
• Method declaration with parameter
• public and private keywords, set and get conventions
• Constructor
14
Instructor: Tanzila Kehkashan
Assignment # 1
Write your name with asterisks.
15
Instructor: Tanzila Kehkashan
16
Instructor: Tanzila Kehkashan

More Related Content

PPSX
Intoduction to java
PPSX
Dr. Rajeshree Khande :Intoduction to java
PPTX
Introduction to java
PPTX
java intro.pptx
PPTX
1_Introduction to Java.pptx java programming
PPTX
01. Introduction to programming with java
PPTX
OOP - Lecture02 - Introduction to Java.pptx
PPT
Servlets and JavaServer Pages (JSP) from the B.Sc. Computer Science and Infor...
Intoduction to java
Dr. Rajeshree Khande :Intoduction to java
Introduction to java
java intro.pptx
1_Introduction to Java.pptx java programming
01. Introduction to programming with java
OOP - Lecture02 - Introduction to Java.pptx
Servlets and JavaServer Pages (JSP) from the B.Sc. Computer Science and Infor...

Similar to OOP Lecture 1-Intro to Java.pptx (20)

PPTX
Introduction to java
PDF
Lecture java01
PPTX
Java session2
PDF
Java - At a glance
PPTX
Object Oriented Programming Part 1 of Unit 1
PDF
What is java
DOCX
JAVA CORE
PPT
Java Programming : introduction
PDF
Java Basic.pdf
PDF
What is-java
PPSX
Java Semimar Slide (Cetpa)
PPSX
Java Semimar Slide (Cetpa)
PPT
j-chap1-Basics.ppt
PPTX
JAVAPart1_BasicIntroduction.pptx
PPTX
JAVA_Day1_BasicIntroduction.pptx
PPTX
1 java programming- introduction
PPT
Java-Unit-I.ppt
PPT
Chapter 1 java
PPT
PPS Java Overview Unit I.ppt
PPT
PPS Java Overview Unit I.ppt
Introduction to java
Lecture java01
Java session2
Java - At a glance
Object Oriented Programming Part 1 of Unit 1
What is java
JAVA CORE
Java Programming : introduction
Java Basic.pdf
What is-java
Java Semimar Slide (Cetpa)
Java Semimar Slide (Cetpa)
j-chap1-Basics.ppt
JAVAPart1_BasicIntroduction.pptx
JAVA_Day1_BasicIntroduction.pptx
1 java programming- introduction
Java-Unit-I.ppt
Chapter 1 java
PPS Java Overview Unit I.ppt
PPS Java Overview Unit I.ppt
Ad

More from Tanzila Kehkashan (20)

PPTX
OOP Lecture 25-Network Programming-Part2.pptx
PPTX
OOP Lecture 24-Network Programming-Part1.pptx
PPTX
OOP Lecture 23-JAR Files.pptx
PPTX
OOP Lecture 22-JApplet.pptx
PPTX
OOP Lecture 21-Graphics, Audio.pptx
PPTX
OOP Lecture 20-MultiThreading.pptx
PPTX
OOP Lecture 19-JMenuBar.pptx
PPTX
OOP Lecture 18-DB Connectivity-Part2.pptx
PPTX
OOP Lecture 17-DB Connectivity-Part1.pptx
PPTX
OOP Lecture 16-Math,Timer.pptx
PPTX
OOP Lecture 15-FileHandling,JFileChooser.pptx
PPTX
OOP Lecture 14-ExceptionHandling.pptx
PPTX
OOP Lecture 13-Color,Font,ImageIcon.pptx
PPTX
OOP Lecture 12-EventHandling2.pptx
PPTX
OOP Lecture 11-EventHandling1.pptx
PPTX
OOP Lecture 10-JTable,JTabbedPane,LayoutManagers.pptx
PPTX
OOP Lecture 9-JComboBox,JList,JPanel.pptx
PPTX
OOP Lecture 8-JCheckBox,JRadioButton,JProgressBar.pptx
PPTX
OOP Lecture 7-JTextField,JTextArea,JPassword,JButton.pptx
PPTX
OOP Lecture 6-JFrame,JScrollPane,JLabel.pptx
OOP Lecture 25-Network Programming-Part2.pptx
OOP Lecture 24-Network Programming-Part1.pptx
OOP Lecture 23-JAR Files.pptx
OOP Lecture 22-JApplet.pptx
OOP Lecture 21-Graphics, Audio.pptx
OOP Lecture 20-MultiThreading.pptx
OOP Lecture 19-JMenuBar.pptx
OOP Lecture 18-DB Connectivity-Part2.pptx
OOP Lecture 17-DB Connectivity-Part1.pptx
OOP Lecture 16-Math,Timer.pptx
OOP Lecture 15-FileHandling,JFileChooser.pptx
OOP Lecture 14-ExceptionHandling.pptx
OOP Lecture 13-Color,Font,ImageIcon.pptx
OOP Lecture 12-EventHandling2.pptx
OOP Lecture 11-EventHandling1.pptx
OOP Lecture 10-JTable,JTabbedPane,LayoutManagers.pptx
OOP Lecture 9-JComboBox,JList,JPanel.pptx
OOP Lecture 8-JCheckBox,JRadioButton,JProgressBar.pptx
OOP Lecture 7-JTextField,JTextArea,JPassword,JButton.pptx
OOP Lecture 6-JFrame,JScrollPane,JLabel.pptx
Ad

Recently uploaded (20)

PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PDF
17 Powerful Integrations Your Next-Gen MLM Software Needs
PPTX
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
PDF
iTop VPN 6.5.0 Crack + License Key 2025 (Premium Version)
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
Website Design Services for Small Businesses.pdf
PPTX
Advanced SystemCare Ultimate Crack + Portable (2025)
PDF
iTop VPN Crack Latest Version Full Key 2025
PPTX
history of c programming in notes for students .pptx
PDF
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
PPTX
Oracle Fusion HCM Cloud Demo for Beginners
PPTX
Patient Appointment Booking in Odoo with online payment
PPTX
WiFi Honeypot Detecscfddssdffsedfseztor.pptx
PDF
Tally Prime Crack Download New Version 5.1 [2025] (License Key Free
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PPTX
assetexplorer- product-overview - presentation
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
iTop VPN Free 5.6.0.5262 Crack latest version 2025
Design an Analysis of Algorithms II-SECS-1021-03
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
17 Powerful Integrations Your Next-Gen MLM Software Needs
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
iTop VPN 6.5.0 Crack + License Key 2025 (Premium Version)
Operating system designcfffgfgggggggvggggggggg
Navsoft: AI-Powered Business Solutions & Custom Software Development
Website Design Services for Small Businesses.pdf
Advanced SystemCare Ultimate Crack + Portable (2025)
iTop VPN Crack Latest Version Full Key 2025
history of c programming in notes for students .pptx
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
Oracle Fusion HCM Cloud Demo for Beginners
Patient Appointment Booking in Odoo with online payment
WiFi Honeypot Detecscfddssdffsedfseztor.pptx
Tally Prime Crack Download New Version 5.1 [2025] (License Key Free
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
assetexplorer- product-overview - presentation
Wondershare Filmora 15 Crack With Activation Key [2025
iTop VPN Free 5.6.0.5262 Crack latest version 2025

OOP Lecture 1-Intro to Java.pptx

  • 1. CS3135/CS2135 Object Oriented Programming (Java) BSCS-3 / MCS-3 Lecture # 1 Intro to Java
  • 2. Compulsory Reading Material Java; How to Program (9th Edition) by Paul Deitel & Harvey Deitel ASSESSMENT & EVALUATION CRITERIA • Quizzes 5 % • Assignments 10 % • Mid Term 20 % • Project 15 % • Final Term 50 % • Total: 100 % 2 Instructor: Tanzila Kehkashan
  • 3. 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 3 Instructor: Tanzila Kehkashan
  • 4. 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 4 Instructor: Tanzila Kehkashan
  • 5. 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. 5 Instructor: Tanzila Kehkashan
  • 6. 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 6 Instructor: Tanzila Kehkashan
  • 7. Popular Java IDEs • NetBeans; Open Source by Sun • Eclipse; Open Source by IBM • Borland Jbuilder • BlueJ • Jcreator • IntelliJ IDEA • Dr. Java 7 Instructor: Tanzila Kehkashan
  • 8. 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. 8 Instructor: Tanzila Kehkashan
  • 9. 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 Traditional Compiled Program Java Program 9 Instructor: Tanzila Kehkashan
  • 10. A High Level View Of Translating/Executing Java Programs Java compiler (javac) Java program Filename.java Java bytecode (generic binary) Filename.class Stage 1: Compilation Bytecodes are a set of instructions that looks a lot like some machine codes, but that is not specific to any one processor. 10 Instructor: Tanzila Kehkashan
  • 11. A High Level View Of Translating/Executing Java Programs Java interpreter (java) Java bytecode (generic binary) Filename.class Machine language instruction (UNIX) Machine language instruction (Windows) Machine language instruction (Apple) Stage 2: Interpreting and executing the byte code 11 Instructor: Tanzila Kehkashan
  • 12. First Program in Java public class bscsfirst { public static void main(String[] args) { System.out.println(“Hello BSCS”); } } 12 Instructor: Tanzila Kehkashan
  • 13. TOPICS TO COVER • http://docs.oracle.com/javase/7/docs/api/overview-summary.html • 2 types of Comments • Difference b/w print & println • Escape Sequence • Use of printf • Variable declaration and types • Primitive data types • Class name • An array 13 Instructor: Tanzila Kehkashan
  • 14. Topics To Cover • Arithmetic operators (+, -, /, *, %) • Relational operators (==, !=, >, <, >=, <=) • Class declaration • Compiling an application with multiple classes • javac file1.java file2.java • javac *.java • Method declaration with parameter • public and private keywords, set and get conventions • Constructor 14 Instructor: Tanzila Kehkashan
  • 15. Assignment # 1 Write your name with asterisks. 15 Instructor: Tanzila Kehkashan