TRINITY INSTITUTE OF PROFESSIONAL STUDIES
Sector – 9, Dwarka Institutional Area, New Delhi-75
Affiliated Institution of G.G.S.IP.U, Delhi
BCA
JAVA PROGRAMMING
BCA 206
JAVA Basics
Keywords: oop, jdk, applets
TRINITY INSTITUTE OF PROFESSIONAL STUDIES
Sector – 9, Dwarka Institutional Area, New Delhi-75
OOP Concept
Class
• A class is a blueprint or prototype
• A class is a set of attributes and behaviour
shared by similar object.
• Classes are user defined datatype.
• A class defines what data can be in an object,
and what operations are performed by the
methods
TRINITY INSTITUTE OF PROFESSIONAL STUDIES
Sector – 9, Dwarka Institutional Area, New Delhi-75
Object
• It is a tangible entity
• It is a instance of class
• An object consists of data and functions known as methods which use or
change the data. (Methods are similar to procedures or functions in other
languages.)
• An object is a software bundle of related variables and methods. Software
objects are often used to model real-world objects you find in everyday life.
• These objects have state and behavior .
• A car can be modelled by an object. A car has state (how fast it's going, in
which direction, its fuel consumption, and so on) and behavior (starts, stops,
turns, slides, and runs into trees).
• The espresso machine can be modelled as an object. It has state (water
temperature, amount of coffee in the hopper) and it has behavior (emits steam,
makes noise, and brews a perfect cup of java).
TRINITY INSTITUTE OF PROFESSIONAL STUDIES
Sector – 9, Dwarka Institutional Area, New Delhi-75
Principles
• Abstraction
• Encapsulation
• Inheritance
• Polymorphism
TRINITY INSTITUTE OF PROFESSIONAL STUDIES
Sector – 9, Dwarka Institutional Area, New Delhi-75
JAVA
• Java technology is both a
programming language and a
platform.
TRINITY INSTITUTE OF PROFESSIONAL STUDIES
Sector – 9, Dwarka Institutional Area, New Delhi-75
• The massive growth of the Internet and the
World-Wide Web leads to a completely new
way of looking at development and distribution
of software.
• To live in the world of electronic commerce and
distribution, Java technology must enable the
development of secure, high performance, and
highly robust applications on multiple platforms
in heterogeneous, distributed networks.
JAVA
TRINITY INSTITUTE OF PROFESSIONAL STUDIES
Sector – 9, Dwarka Institutional Area, New Delhi-75
Introduction to Java
• Java is an Object oriented programming
language platform.
• Developed by Sun Microsystems in 1991
• Original name was Oak.
• It was conceived by James Gosling.
• It has built-in application programming
interface (API) that can handle graphics and
user interfaces and that can be used to create
applications or applets.
VERSIONS
TRINITY INSTITUTE OF PROFESSIONAL STUDIES
Sector – 9, Dwarka Institutional Area, New Delhi-75
JDK Versions
• JDK 1.02 (1995)
• JDK 1.1 (1996)
• Java 2 SDK v 1.2 (JDK 1.2, 1998)
• Java 2 SDK v 1.3 (JDK 1.3, 2000)
• Java 2 SDK v 1.4 (JDK 1.4, 2002)
• Java 2 5.0 (2006)
• Java SE 7(mid 2010)
TRINITY INSTITUTE OF PROFESSIONAL STUDIES
Sector – 9, Dwarka Institutional Area, New Delhi-75
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.
TRINITY INSTITUTE OF PROFESSIONAL STUDIES
Sector – 9, Dwarka Institutional Area, New Delhi-75
Applets, Servlets and Applications
• An applet is designed to be embedded in a Web
page, and run by a browser
• Applets run in a sandbox with numerous
restrictions; for example, they can’t read files
and then use the network
• A servlet is designed to be run by a web server
• An application is a conventional program
TRINITY INSTITUTE OF PROFESSIONAL STUDIES
Sector – 9, Dwarka Institutional Area, New Delhi-75
Features
• Simple
• Object oriented
• Robust : Memory management and Exception handling
• Architecture neutral and portable
• Compiled and interpreted
• Distributed
• Secure
• Multithreaded
• High performance
• Dynamic
• Garbage Collected
TRINITY INSTITUTE OF PROFESSIONAL STUDIES
Sector – 9, Dwarka Institutional Area, New Delhi-75
Working of Java
• Java solves the problem of platform-independence by
using byte code.
• The Java compiler does not produce native executable
code for a particular machine like a C compiler would.
Instead it produces a special format called byte code.
• Java byte code starts with CA FE BA BE
This looks a lot like machine language, but unlike machine
language Java byte code is exactly the same on every
platform.
• This byte code fragment means the same thing on a
Solaris workstation as it does on a Macintosh
PowerBook.
TRINITY INSTITUTE OF PROFESSIONAL STUDIES
Sector – 9, Dwarka Institutional Area, New Delhi-75
Platform
Working of JAVA contd..
• Java programs that have been compiled into byte code still need an
interpreter to execute them on any given platform.
• The interpreter reads the byte code and translates it into the native
language of the host machine on the fly.
• The most common such interpreter is Sun's program java (with a little j).
Since the byte code is completely platform independent, only the
interpreter and a few native libraries need to be ported to get Java to run on
a new computer or operating system.
• The rest of the runtime environment including the compiler and most of
the class libraries are written in Java.
• All these pieces, the javac compiler, the java interpreter, the Java
programming language, and more are collectively referred to as Java.
TRINITY INSTITUTE OF PROFESSIONAL STUDIES
Sector – 9, Dwarka Institutional Area, New Delhi-75
• A class is a template for a Java object, and each class is compiled into a
separate file called a class file.
• The Java Virtual Machine itself knows nothing about the Java language, but
instead understands class files and the virtual machine instruction set.
• Each class file contains class constants, information about instance variables
(variables created for each new object of a class), as well as method code (in
bytecode format) and various symbol tables.
• When the programmer asks for a new instance of a class the compiler will
generate a new instruction for the virtual machine, along with a reference to
the required class name.
Working of JAVA contd..
TRINITY INSTITUTE OF PROFESSIONAL STUDIES
Sector – 9, Dwarka Institutional Area, New Delhi-75
• The virtual machine will then locate and load the appropriate
class file, and create a new object according to the template the
file contains.
• Within each class file, all references to methods or fields of
other classes are stored textually, in an area of the file known
as the constant pool.
• This is to ensure that classes can be recompiled with new
fields or methods, without breaking older code that uses the
same class. This dynamic linking helps to make Java a robust
language.
Working of JAVA contd..

More Related Content

PPTX
INTRODUCTION TO INFORMATION TECHNOLOGY- IT Basics
PPTX
Computer Networks- Network Basics
PDF
Norse Mythology
DOC
02 sopar octubre 16
PPT
Profesní a národní emancipace českého učitelstva národních škol 1869-1883 - T...
PDF
Сокращение логистических затрат
PPT
Migrace a transformace center v Liberci - Václav Umlauf
INTRODUCTION TO INFORMATION TECHNOLOGY- IT Basics
Computer Networks- Network Basics
Norse Mythology
02 sopar octubre 16
Profesní a národní emancipace českého učitelstva národních škol 1869-1883 - T...
Сокращение логистических затрат
Migrace a transformace center v Liberci - Václav Umlauf

Viewers also liked (9)

PPT
iShares Template Resdesign
PPT
How to Use Social Media for Recruitment
DOCX
An overview of the law on professional negligence in sri lanka
PPTX
3 burlington adam wonnacott legal
PDF
Work Samples
PPT
Game Theory A Beautiful Mind
PPTX
STUDENT TEACHERS LEARNING TO THINK, KNOW, FEEL AND ACT LIKE A TEACHER: THE IM...
PPTX
Project 3 discussion research
iShares Template Resdesign
How to Use Social Media for Recruitment
An overview of the law on professional negligence in sri lanka
3 burlington adam wonnacott legal
Work Samples
Game Theory A Beautiful Mind
STUDENT TEACHERS LEARNING TO THINK, KNOW, FEEL AND ACT LIKE A TEACHER: THE IM...
Project 3 discussion research
Ad

Similar to JAVA PROGRAMMING- OOP Concept (20)

PDF
Java programming
PDF
Introduction to Java Programming
PPT
JAVA object oriented programming (oop).ppt
PPT
L1 basics
PPTX
object oriented programming unit one ppt
PPT
Object oriented programming_Unit1_Introduction.ppt
PPTX
PPTX
oop unit1.pptx
PPTX
1.Intro--Why Java.pptx
PPTX
Untitled presentation about object oriented.pptx
PPTX
Java Basics for Beginners : Start Coding Now
PPTX
2. Introduction to Java for engineering stud
PDF
1. JAVA_Module_1-edited - AJIN ABRAHAM.pptx.pdf
PPTX
Java Introduction
PPTX
Java v/s .NET - Which is Better?
PPTX
U1 JAVA.pptx
PPTX
Vb.net basics 1(vb,net--3 year)
PPT
Fundamentals of JAVA
PDF
Unit 1 Core Java for Compter Science 3rd
PDF
lecture-1111111111111111111111111111.pdf
Java programming
Introduction to Java Programming
JAVA object oriented programming (oop).ppt
L1 basics
object oriented programming unit one ppt
Object oriented programming_Unit1_Introduction.ppt
oop unit1.pptx
1.Intro--Why Java.pptx
Untitled presentation about object oriented.pptx
Java Basics for Beginners : Start Coding Now
2. Introduction to Java for engineering stud
1. JAVA_Module_1-edited - AJIN ABRAHAM.pptx.pdf
Java Introduction
Java v/s .NET - Which is Better?
U1 JAVA.pptx
Vb.net basics 1(vb,net--3 year)
Fundamentals of JAVA
Unit 1 Core Java for Compter Science 3rd
lecture-1111111111111111111111111111.pdf
Ad

More from Trinity Dwarka (20)

PPTX
Why BAJMC in Trinity Dwarka
PPTX
Career Options after BCA
PPTX
Principles of Management-Management-Concept & Meaning
PPTX
Principles of Management- Management Process & Functions
PPTX
Principles of Management- Managerial Levels & Roles-
PPTX
Management-Concept & Meaning
PPTX
Principles of Management- Planning
PPTX
Organizing Authority & Responsibility- Principles of Management
PPTX
Staffing- Principles of Management
PPTX
Directing-Principles of Management
PPTX
Dimensional Modelling-Data Warehouse & Data Mining
PPTX
Data Preprocessing- Data Warehouse & Data Mining
PPTX
Java Programming- Introduction to Java Applet Programs
PPTX
Linux Environment- Linux vs Unix
PPTX
Linux Environment- Linux Basics
PPTX
BCA-Mobile Computing- BASICS OF MOBILE COMPUTING
PPTX
Database Management System
PPTX
E-Commerce- Introduction to E-Commerce
PPTX
DIGITAL ELECTRONICS- Minimization Technique Karnaugh Map
PPTX
DIGITAL ELECTRONICS- Number System
Why BAJMC in Trinity Dwarka
Career Options after BCA
Principles of Management-Management-Concept & Meaning
Principles of Management- Management Process & Functions
Principles of Management- Managerial Levels & Roles-
Management-Concept & Meaning
Principles of Management- Planning
Organizing Authority & Responsibility- Principles of Management
Staffing- Principles of Management
Directing-Principles of Management
Dimensional Modelling-Data Warehouse & Data Mining
Data Preprocessing- Data Warehouse & Data Mining
Java Programming- Introduction to Java Applet Programs
Linux Environment- Linux vs Unix
Linux Environment- Linux Basics
BCA-Mobile Computing- BASICS OF MOBILE COMPUTING
Database Management System
E-Commerce- Introduction to E-Commerce
DIGITAL ELECTRONICS- Minimization Technique Karnaugh Map
DIGITAL ELECTRONICS- Number System

Recently uploaded (20)

PDF
Empowerment Technology for Senior High School Guide
PDF
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 2).pdf
PDF
Journal of Dental Science - UDMY (2022).pdf
PDF
Vision Prelims GS PYQ Analysis 2011-2022 www.upscpdf.com.pdf
PDF
Literature_Review_methods_ BRACU_MKT426 course material
PDF
AI-driven educational solutions for real-life interventions in the Philippine...
PDF
LIFE & LIVING TRILOGY - PART - (2) THE PURPOSE OF LIFE.pdf
PDF
BP 505 T. PHARMACEUTICAL JURISPRUDENCE (UNIT 1).pdf
PPTX
Unit 4 Computer Architecture Multicore Processor.pptx
PPTX
DRUGS USED FOR HORMONAL DISORDER, SUPPLIMENTATION, CONTRACEPTION, & MEDICAL T...
PDF
Complications of Minimal Access-Surgery.pdf
PPTX
A powerpoint presentation on the Revised K-10 Science Shaping Paper
PDF
LIFE & LIVING TRILOGY- PART (1) WHO ARE WE.pdf
PPTX
ELIAS-SEZIURE AND EPilepsy semmioan session.pptx
PDF
Journal of Dental Science - UDMY (2021).pdf
PPTX
Introduction to pro and eukaryotes and differences.pptx
PPTX
Module on health assessment of CHN. pptx
PDF
Hazard Identification & Risk Assessment .pdf
PDF
LIFE & LIVING TRILOGY - PART (3) REALITY & MYSTERY.pdf
PDF
1.3 FINAL REVISED K-10 PE and Health CG 2023 Grades 4-10 (1).pdf
Empowerment Technology for Senior High School Guide
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 2).pdf
Journal of Dental Science - UDMY (2022).pdf
Vision Prelims GS PYQ Analysis 2011-2022 www.upscpdf.com.pdf
Literature_Review_methods_ BRACU_MKT426 course material
AI-driven educational solutions for real-life interventions in the Philippine...
LIFE & LIVING TRILOGY - PART - (2) THE PURPOSE OF LIFE.pdf
BP 505 T. PHARMACEUTICAL JURISPRUDENCE (UNIT 1).pdf
Unit 4 Computer Architecture Multicore Processor.pptx
DRUGS USED FOR HORMONAL DISORDER, SUPPLIMENTATION, CONTRACEPTION, & MEDICAL T...
Complications of Minimal Access-Surgery.pdf
A powerpoint presentation on the Revised K-10 Science Shaping Paper
LIFE & LIVING TRILOGY- PART (1) WHO ARE WE.pdf
ELIAS-SEZIURE AND EPilepsy semmioan session.pptx
Journal of Dental Science - UDMY (2021).pdf
Introduction to pro and eukaryotes and differences.pptx
Module on health assessment of CHN. pptx
Hazard Identification & Risk Assessment .pdf
LIFE & LIVING TRILOGY - PART (3) REALITY & MYSTERY.pdf
1.3 FINAL REVISED K-10 PE and Health CG 2023 Grades 4-10 (1).pdf

JAVA PROGRAMMING- OOP Concept

  • 1. TRINITY INSTITUTE OF PROFESSIONAL STUDIES Sector – 9, Dwarka Institutional Area, New Delhi-75 Affiliated Institution of G.G.S.IP.U, Delhi BCA JAVA PROGRAMMING BCA 206 JAVA Basics Keywords: oop, jdk, applets
  • 2. TRINITY INSTITUTE OF PROFESSIONAL STUDIES Sector – 9, Dwarka Institutional Area, New Delhi-75 OOP Concept Class • A class is a blueprint or prototype • A class is a set of attributes and behaviour shared by similar object. • Classes are user defined datatype. • A class defines what data can be in an object, and what operations are performed by the methods
  • 3. TRINITY INSTITUTE OF PROFESSIONAL STUDIES Sector – 9, Dwarka Institutional Area, New Delhi-75 Object • It is a tangible entity • It is a instance of class • An object consists of data and functions known as methods which use or change the data. (Methods are similar to procedures or functions in other languages.) • An object is a software bundle of related variables and methods. Software objects are often used to model real-world objects you find in everyday life. • These objects have state and behavior . • A car can be modelled by an object. A car has state (how fast it's going, in which direction, its fuel consumption, and so on) and behavior (starts, stops, turns, slides, and runs into trees). • The espresso machine can be modelled as an object. It has state (water temperature, amount of coffee in the hopper) and it has behavior (emits steam, makes noise, and brews a perfect cup of java).
  • 4. TRINITY INSTITUTE OF PROFESSIONAL STUDIES Sector – 9, Dwarka Institutional Area, New Delhi-75 Principles • Abstraction • Encapsulation • Inheritance • Polymorphism
  • 5. TRINITY INSTITUTE OF PROFESSIONAL STUDIES Sector – 9, Dwarka Institutional Area, New Delhi-75 JAVA • Java technology is both a programming language and a platform.
  • 6. TRINITY INSTITUTE OF PROFESSIONAL STUDIES Sector – 9, Dwarka Institutional Area, New Delhi-75 • The massive growth of the Internet and the World-Wide Web leads to a completely new way of looking at development and distribution of software. • To live in the world of electronic commerce and distribution, Java technology must enable the development of secure, high performance, and highly robust applications on multiple platforms in heterogeneous, distributed networks. JAVA
  • 7. TRINITY INSTITUTE OF PROFESSIONAL STUDIES Sector – 9, Dwarka Institutional Area, New Delhi-75 Introduction to Java • Java is an Object oriented programming language platform. • Developed by Sun Microsystems in 1991 • Original name was Oak. • It was conceived by James Gosling. • It has built-in application programming interface (API) that can handle graphics and user interfaces and that can be used to create applications or applets. VERSIONS
  • 8. TRINITY INSTITUTE OF PROFESSIONAL STUDIES Sector – 9, Dwarka Institutional Area, New Delhi-75 JDK Versions • JDK 1.02 (1995) • JDK 1.1 (1996) • Java 2 SDK v 1.2 (JDK 1.2, 1998) • Java 2 SDK v 1.3 (JDK 1.3, 2000) • Java 2 SDK v 1.4 (JDK 1.4, 2002) • Java 2 5.0 (2006) • Java SE 7(mid 2010)
  • 9. TRINITY INSTITUTE OF PROFESSIONAL STUDIES Sector – 9, Dwarka Institutional Area, New Delhi-75 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.
  • 10. TRINITY INSTITUTE OF PROFESSIONAL STUDIES Sector – 9, Dwarka Institutional Area, New Delhi-75 Applets, Servlets and Applications • An applet is designed to be embedded in a Web page, and run by a browser • Applets run in a sandbox with numerous restrictions; for example, they can’t read files and then use the network • A servlet is designed to be run by a web server • An application is a conventional program
  • 11. TRINITY INSTITUTE OF PROFESSIONAL STUDIES Sector – 9, Dwarka Institutional Area, New Delhi-75 Features • Simple • Object oriented • Robust : Memory management and Exception handling • Architecture neutral and portable • Compiled and interpreted • Distributed • Secure • Multithreaded • High performance • Dynamic • Garbage Collected
  • 12. TRINITY INSTITUTE OF PROFESSIONAL STUDIES Sector – 9, Dwarka Institutional Area, New Delhi-75 Working of Java • Java solves the problem of platform-independence by using byte code. • The Java compiler does not produce native executable code for a particular machine like a C compiler would. Instead it produces a special format called byte code. • Java byte code starts with CA FE BA BE This looks a lot like machine language, but unlike machine language Java byte code is exactly the same on every platform. • This byte code fragment means the same thing on a Solaris workstation as it does on a Macintosh PowerBook.
  • 13. TRINITY INSTITUTE OF PROFESSIONAL STUDIES Sector – 9, Dwarka Institutional Area, New Delhi-75 Platform Working of JAVA contd.. • Java programs that have been compiled into byte code still need an interpreter to execute them on any given platform. • The interpreter reads the byte code and translates it into the native language of the host machine on the fly. • The most common such interpreter is Sun's program java (with a little j). Since the byte code is completely platform independent, only the interpreter and a few native libraries need to be ported to get Java to run on a new computer or operating system. • The rest of the runtime environment including the compiler and most of the class libraries are written in Java. • All these pieces, the javac compiler, the java interpreter, the Java programming language, and more are collectively referred to as Java.
  • 14. TRINITY INSTITUTE OF PROFESSIONAL STUDIES Sector – 9, Dwarka Institutional Area, New Delhi-75 • A class is a template for a Java object, and each class is compiled into a separate file called a class file. • The Java Virtual Machine itself knows nothing about the Java language, but instead understands class files and the virtual machine instruction set. • Each class file contains class constants, information about instance variables (variables created for each new object of a class), as well as method code (in bytecode format) and various symbol tables. • When the programmer asks for a new instance of a class the compiler will generate a new instruction for the virtual machine, along with a reference to the required class name. Working of JAVA contd..
  • 15. TRINITY INSTITUTE OF PROFESSIONAL STUDIES Sector – 9, Dwarka Institutional Area, New Delhi-75 • The virtual machine will then locate and load the appropriate class file, and create a new object according to the template the file contains. • Within each class file, all references to methods or fields of other classes are stored textually, in an area of the file known as the constant pool. • This is to ensure that classes can be recompiled with new fields or methods, without breaking older code that uses the same class. This dynamic linking helps to make Java a robust language. Working of JAVA contd..