SlideShare a Scribd company logo
4
Most read
6
Most read
20
Most read
CORE JAVA LESSONS
WRITE ONCE RUN ANYWHERE
reply2vivekshah@gmail.com
OOPS Concept
Think, walk and live in
Object oriented paradigm
OOPS Concept
 Classes and Objects
 Encapsulation
 Abstraction
 Inheritance
 Polymorphism
OOPS Concept – Classes and Object
Class - A class can be
defined as a template/blue
print that describes the
behaviours/states that object
of its type support.
Object - Objects have
states and
behaviours/states .
Example: A dog has states -
color, name, breed as well
as behaviors -wagging,
barking, eating. An object is
an instance of a class.
OOPS Concept – Encapsulation
Class A
Private Data
Operations
Class B
Private Data
Operations
• Encapsulation is the mechanism that binds
together code and the data if manipulates,
and keeps both safe from outside
interference and misuse.
• One way to think about encapsulation is as
a protective wrapper that prevents the code
and data from being arbitrarily accessed by
other code defined outside the wrapper.
OOPS Concept – Abstraction
• Abstraction refers to the act of representing essential features without
including the background details.
• hiding unnecessary data from the users and making the application as
user friendly then it is called as abstrcation
Data abstraction is a
technique of creating new
data types that are well suited
to an application
It allows creation of user
defined data types, having
the properties of built in data
types and set of permitted
operations
OOPS Concept – Inheritance
• Inheritance is the property which allows a Child class to inherit some
properties from its parent class.
• New Data types can be defined as extension to previous defined types
• Base class or parent class or super class -> Derived class or child class( or
sub class
• Sub class inherits properties from super class
OOPS Concept – Inheritance
Example
OOPS Concept – Inheritance
(Reusability)
• If multiple class have common attributes/method, these methods can be
moved to common class – parent class
• Example: Rectangle and circle method have a common methods move(),
which changing the centre co-ordinates
OOPS Concept – Inheritance
(Specialization)
• Specialized behavior can be added to the child class
• In this case behavior will be implemented in the child class
• For example, The implementation of area() method in the circle class is
different from the rectangle class
OOPS Concept – Multiple Inheritance
• Inherit properties from more than one class
• This is called multiple inheritance
• Multiple inheritance is not supported in java (Diamond problem) but is
supported in c++
OOPS Concept – Polymorphism
• Polymorphic which means “many forms” has Greek roots
• Poly – many
• Morphos – forms
• Polymorphism gives us the ultimate flexibility in extensibility. The ability to
define more than one function with the same name is called Polymorphism.
• Method overloading
• Method Overriding
Benefits of Java Language
• Simple and powerful
• Safe
• Object oriented
• Robust
• Architecture neutral and portable
• Compiled and interpreted
• Multi threaded
• Distributed
Java is a simple language
• Java is designed to be easy for the professional programmer to learn and
use.
Java is a portable
• Write once run every where
Java is a compiled and interpreter
language
Java is robust language
• Robust means Strong. Java
programs are strong and they don’t
crash easily like c and c++. why?
• Excellent Exception handling
• Memory Management
• Class loader sub system of
JVM will allocate necessary
memory for java program.
• Garbage Collector de allocates
the memory
Java for distributed environment
• Java is designed for the distributed environment
of the Internet. Because it handles TCP/IP
protocols
• Java supports RMI (Remote Method Invocation).
• This feature enables a programmer to invoke
methods across the network.
Getting started - setting up your
environment
• Download and install jdk6 or jdk7 from oracle.com
• Check environment variable for java and javac commands
• Check java and javac command from shell or command prompt
Getting started – Java Tools
Tool Name Brief Description
appletviewer Run and debug applets without a web browser.
apt Annotation processing tool.
See Annotation Processing Tool for program
annotation processing.
extcheck Utility to detect Jar conflicts.
jar Create and manage Java Archive (JAR) files.
See Java Archive Files page for the JAR
specification.
java The launcher for Java applications. In this release,
a single launcher is used both for development and
deployment.
The old deployment launcher, jre, is no longer
provided.
javac The compiler for the Java programming language.
javadoc API documentation generator.
See Javadoc Tool page for doclet and taglet APIs.
javah C header and stub generator. Used to write native
methods.
javap Class file disassembler
jdb The Java Debugger.
See JPDA for the debugger architecture
specifications.
Getting started - Writing first java program
• Writing First Hello world java program
• Compiling and running java program

More Related Content

What's hot (20)

PDF
Basic Java Programming
Math-Circle
 
PPTX
java training in jaipur|java training|core java training|java training compa...
infojaipurinfo Jaipur
 
PDF
Java - OOPS and Java Basics
Victer Paul
 
PPTX
Introduction to JAVA
Md. Tanvir Hossain
 
PPTX
Java 101 Intro to Java Programming
agorolabs
 
PPTX
Introduction to java
Steve Fort
 
PPTX
Java basic-tutorial for beginners
Muzammil Ali
 
PPTX
Object oriented programming-with_java
Hoang Nguyen
 
PPTX
Object oriented concepts with java
ishmecse13
 
PPTX
Introduction to JAVA
Mindsmapped Consulting
 
PPTX
Chapter 1
siragezeynu
 
PDF
JAVA Object Oriented Programming (OOP)
Prof. Erwin Globio
 
PPTX
Core java
Ravi varma
 
PDF
Core java course syllabus
Papitha Velumani
 
PPTX
Java training in delhi
APSMIND TECHNOLOGY PVT LTD.
 
PPTX
Introduction to java 101
kankemwa Ishaku
 
PDF
Top 10 Java Interview Questions and Answers 2014
iimjobs and hirist
 
PPTX
Core Java introduction | Basics | free course
Kernel Training
 
PPTX
Basic online java course - Brainsmartlabs
brainsmartlabsedu
 
PPT
Java introduction
Sagar Verma
 
Basic Java Programming
Math-Circle
 
java training in jaipur|java training|core java training|java training compa...
infojaipurinfo Jaipur
 
Java - OOPS and Java Basics
Victer Paul
 
Introduction to JAVA
Md. Tanvir Hossain
 
Java 101 Intro to Java Programming
agorolabs
 
Introduction to java
Steve Fort
 
Java basic-tutorial for beginners
Muzammil Ali
 
Object oriented programming-with_java
Hoang Nguyen
 
Object oriented concepts with java
ishmecse13
 
Introduction to JAVA
Mindsmapped Consulting
 
Chapter 1
siragezeynu
 
JAVA Object Oriented Programming (OOP)
Prof. Erwin Globio
 
Core java
Ravi varma
 
Core java course syllabus
Papitha Velumani
 
Java training in delhi
APSMIND TECHNOLOGY PVT LTD.
 
Introduction to java 101
kankemwa Ishaku
 
Top 10 Java Interview Questions and Answers 2014
iimjobs and hirist
 
Core Java introduction | Basics | free course
Kernel Training
 
Basic online java course - Brainsmartlabs
brainsmartlabsedu
 
Java introduction
Sagar Verma
 

Viewers also liked (20)

PPT
Core java concepts
Ram132
 
PPSX
Employee Management System
vivek shah
 
PPT
Java basic
Sonam Sharma
 
PPT
01 Java Is Architecture Neutral
rajuglobal
 
PPT
Core java
kasaragaddaslide
 
PDF
Php peers
Satya Johnny
 
PPTX
High Performance Data Analytics with Java on Large Multicore HPC Clusters
Saliya Ekanayake
 
PDF
5th semester VTU BE CS & IS question papers from 2010 to July 2016
Coorg Institute of Technology, Department Of Library & Information Center , Ponnampet
 
PDF
Java Programming Question paper Aurangabad MMS
Ashwin Mane
 
PDF
5th Semester (December; January-2014 and 2015) Computer Science and Informati...
BGS Institute of Technology, Adichunchanagiri University (ACU)
 
PDF
Stefan Richter - Writing simple, readable and robust code: Examples in Java, ...
AboutYouGmbH
 
PPTX
Introduction to JAVA
javatrainingonline
 
PPT
eClinicalWorks ASP | 2009 Medical Summit
webhostingguy
 
PPT
eClinicalWorks interview questions and answers
sonmadi
 
DOCX
Java mcq
avinash9821
 
PPTX
OOPS features using Objective C
Tiyasi Acharya
 
PPTX
eClinicalWorks Patient Engagement Survey
eClinicalWorks
 
PDF
Java (Information Technology) Question paper for T.Y Bca
JIGAR MAKHIJA
 
PPTX
Introduction to Core Java Programming
Collaboration Technologies
 
PPTX
class and objects
Payel Guria
 
Core java concepts
Ram132
 
Employee Management System
vivek shah
 
Java basic
Sonam Sharma
 
01 Java Is Architecture Neutral
rajuglobal
 
Core java
kasaragaddaslide
 
Php peers
Satya Johnny
 
High Performance Data Analytics with Java on Large Multicore HPC Clusters
Saliya Ekanayake
 
5th semester VTU BE CS & IS question papers from 2010 to July 2016
Coorg Institute of Technology, Department Of Library & Information Center , Ponnampet
 
Java Programming Question paper Aurangabad MMS
Ashwin Mane
 
5th Semester (December; January-2014 and 2015) Computer Science and Informati...
BGS Institute of Technology, Adichunchanagiri University (ACU)
 
Stefan Richter - Writing simple, readable and robust code: Examples in Java, ...
AboutYouGmbH
 
Introduction to JAVA
javatrainingonline
 
eClinicalWorks ASP | 2009 Medical Summit
webhostingguy
 
eClinicalWorks interview questions and answers
sonmadi
 
Java mcq
avinash9821
 
OOPS features using Objective C
Tiyasi Acharya
 
eClinicalWorks Patient Engagement Survey
eClinicalWorks
 
Java (Information Technology) Question paper for T.Y Bca
JIGAR MAKHIJA
 
Introduction to Core Java Programming
Collaboration Technologies
 
class and objects
Payel Guria
 
Ad

Similar to Core java lessons (20)

PPTX
Introduction to OOP concepts
Ahmed Farag
 
PPTX
Introduction to oop and java fundamentals
AnsgarMary
 
PPTX
U1 JAVA.pptx
madan r
 
PPTX
Presentation2.ppt java basic core ppt .
KeshavMotivation
 
PPTX
oop unit1.pptx
sureshkumara29
 
PPTX
CS8392 OOP
DhanalakshmiVelusamy1
 
PPT
Java OOP s concepts and buzzwords
Raja Sekhar
 
PPT
Java Fundamentalojhgghjjjjhhgghhjjjjhhj.ppt
akashsachu221
 
PPTX
OOPS (Object Oriented Programming System) CONCEPTS
HariShiva7
 
PPT
Java_notes.ppt
tuyambazejeanclaude
 
PDF
Lectupopplkmkmkkpompom-0ookoimmire 2.pdf
rtreduanur247
 
PDF
Cs8392 oops 5 units notes
Narayanan sockalinganathan
 
PPTX
Principles and advantages of oop ppt
daxesh chauhan
 
DOC
Questpond - Top 10 Interview Questions and Answers on OOPS
gdrealspace
 
PPTX
Java ppt
Apsara G
 
PPTX
Concepts of oop1
SheetalPareek
 
PDF
Top 100 Java Interview Questions with Detailed Answers
Whizlabs
 
PPTX
OOPS in Java
Zeeshan Khan
 
PDF
‏‏‏‏‏‏oop lecture objectives will come.pdf
nabeehmohammedtaher
 
PPTX
Module--fundamentals and operators in java1.pptx
Radhika Venkatesh
 
Introduction to OOP concepts
Ahmed Farag
 
Introduction to oop and java fundamentals
AnsgarMary
 
U1 JAVA.pptx
madan r
 
Presentation2.ppt java basic core ppt .
KeshavMotivation
 
oop unit1.pptx
sureshkumara29
 
Java OOP s concepts and buzzwords
Raja Sekhar
 
Java Fundamentalojhgghjjjjhhgghhjjjjhhj.ppt
akashsachu221
 
OOPS (Object Oriented Programming System) CONCEPTS
HariShiva7
 
Java_notes.ppt
tuyambazejeanclaude
 
Lectupopplkmkmkkpompom-0ookoimmire 2.pdf
rtreduanur247
 
Cs8392 oops 5 units notes
Narayanan sockalinganathan
 
Principles and advantages of oop ppt
daxesh chauhan
 
Questpond - Top 10 Interview Questions and Answers on OOPS
gdrealspace
 
Java ppt
Apsara G
 
Concepts of oop1
SheetalPareek
 
Top 100 Java Interview Questions with Detailed Answers
Whizlabs
 
OOPS in Java
Zeeshan Khan
 
‏‏‏‏‏‏oop lecture objectives will come.pdf
nabeehmohammedtaher
 
Module--fundamentals and operators in java1.pptx
Radhika Venkatesh
 
Ad

Recently uploaded (20)

PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PDF
IoT-Powered Industrial Transformation – Smart Manufacturing to Connected Heal...
Rejig Digital
 
PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PPTX
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
PDF
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
PDF
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
IoT-Powered Industrial Transformation – Smart Manufacturing to Connected Heal...
Rejig Digital
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 

Core java lessons

  • 2. OOPS Concept Think, walk and live in Object oriented paradigm
  • 3. OOPS Concept  Classes and Objects  Encapsulation  Abstraction  Inheritance  Polymorphism
  • 4. OOPS Concept – Classes and Object Class - A class can be defined as a template/blue print that describes the behaviours/states that object of its type support. Object - Objects have states and behaviours/states . Example: A dog has states - color, name, breed as well as behaviors -wagging, barking, eating. An object is an instance of a class.
  • 5. OOPS Concept – Encapsulation Class A Private Data Operations Class B Private Data Operations • Encapsulation is the mechanism that binds together code and the data if manipulates, and keeps both safe from outside interference and misuse. • One way to think about encapsulation is as a protective wrapper that prevents the code and data from being arbitrarily accessed by other code defined outside the wrapper.
  • 6. OOPS Concept – Abstraction • Abstraction refers to the act of representing essential features without including the background details. • hiding unnecessary data from the users and making the application as user friendly then it is called as abstrcation Data abstraction is a technique of creating new data types that are well suited to an application It allows creation of user defined data types, having the properties of built in data types and set of permitted operations
  • 7. OOPS Concept – Inheritance • Inheritance is the property which allows a Child class to inherit some properties from its parent class. • New Data types can be defined as extension to previous defined types • Base class or parent class or super class -> Derived class or child class( or sub class • Sub class inherits properties from super class
  • 8. OOPS Concept – Inheritance Example
  • 9. OOPS Concept – Inheritance (Reusability) • If multiple class have common attributes/method, these methods can be moved to common class – parent class • Example: Rectangle and circle method have a common methods move(), which changing the centre co-ordinates
  • 10. OOPS Concept – Inheritance (Specialization) • Specialized behavior can be added to the child class • In this case behavior will be implemented in the child class • For example, The implementation of area() method in the circle class is different from the rectangle class
  • 11. OOPS Concept – Multiple Inheritance • Inherit properties from more than one class • This is called multiple inheritance • Multiple inheritance is not supported in java (Diamond problem) but is supported in c++
  • 12. OOPS Concept – Polymorphism • Polymorphic which means “many forms” has Greek roots • Poly – many • Morphos – forms • Polymorphism gives us the ultimate flexibility in extensibility. The ability to define more than one function with the same name is called Polymorphism. • Method overloading • Method Overriding
  • 13. Benefits of Java Language • Simple and powerful • Safe • Object oriented • Robust • Architecture neutral and portable • Compiled and interpreted • Multi threaded • Distributed
  • 14. Java is a simple language • Java is designed to be easy for the professional programmer to learn and use.
  • 15. Java is a portable • Write once run every where
  • 16. Java is a compiled and interpreter language
  • 17. Java is robust language • Robust means Strong. Java programs are strong and they don’t crash easily like c and c++. why? • Excellent Exception handling • Memory Management • Class loader sub system of JVM will allocate necessary memory for java program. • Garbage Collector de allocates the memory
  • 18. Java for distributed environment • Java is designed for the distributed environment of the Internet. Because it handles TCP/IP protocols • Java supports RMI (Remote Method Invocation). • This feature enables a programmer to invoke methods across the network.
  • 19. Getting started - setting up your environment • Download and install jdk6 or jdk7 from oracle.com • Check environment variable for java and javac commands • Check java and javac command from shell or command prompt
  • 20. Getting started – Java Tools Tool Name Brief Description appletviewer Run and debug applets without a web browser. apt Annotation processing tool. See Annotation Processing Tool for program annotation processing. extcheck Utility to detect Jar conflicts. jar Create and manage Java Archive (JAR) files. See Java Archive Files page for the JAR specification. java The launcher for Java applications. In this release, a single launcher is used both for development and deployment. The old deployment launcher, jre, is no longer provided. javac The compiler for the Java programming language. javadoc API documentation generator. See Javadoc Tool page for doclet and taglet APIs. javah C header and stub generator. Used to write native methods. javap Class file disassembler jdb The Java Debugger. See JPDA for the debugger architecture specifications.
  • 21. Getting started - Writing first java program • Writing First Hello world java program • Compiling and running java program