SlideShare a Scribd company logo
1 of 19
Presenter & Creator :- Ankit D. Prajapati
Skype: SoftwareLearningTutorials
Email: SoftwareLearningTutorials@gmail.com
WhatsApp: +91-7383908668
Software
Learning
Tutorials !!!
YouTube Channel: Software Learning Tutorials – SLT !!!
https://www.youtube.com/channel/UC_FRkF_0i_YgbFNqzRZ-Nmg
Agenda
 What is JAVA?
 What make JAVA Popular?
 Class, Object & Method
 Interface & Package
 Modifiers
 OOPS Concepts
 References
Software
Learning
Tutorials !!!
What is JAVA ?
Software
Learning
Tutorials !!!
Java is a programming language that produces software for
multiple platforms.
Java derives much of
its syntax from the C
and C++
programming
languages.
It was first released by
Sun Microsystem in
1995 and later acquired
by Oracle Corporation
Java platform includes an
execution engine, a
compiler, and a set of
libraries.
What make JAVA Popular ?
Software
Learning
Tutorials !!!
JAVA
OOPS
High
Performance
Secure
Robust
Platform
Independent
Multi
Threaded
Class – Object – Method
Software
Learning
Tutorials !!!
Class is a user defined
blueprint or prototype from
which objects are created.
Object is an instance of Class.
States & Behaviours
Method is a collection of
statements that are grouped
together to perform an operation
To be continued…!!!
Class – Object – Method
Software
Learning
Tutorials !!!
Interface & Packages
Software
Learning
Tutorials !!!
To be continued…!!!
Interface: An interface is just like Java Class, but it only
has static constants and abstract method.
A class implements an interface, thereby inheriting the
abstract methods of the interface.
Package as the name suggests is a pack (group) of
classes, interfaces and other packages.
In java we use packages to organize our classes and
interfaces
Interface & Abstract Class
Software
Learning
Tutorials !!!
To be continued…!!!
 Java uses Interface to implement multiple
inheritance.
 A Java class can implement multiple Java
Interfaces.
 Class contains ‘Abstract’ keyword.
 If a class is declared abstract, it cannot be
instantiated, which means you cannot
create an object of an abstract class.
Abstract Class Interface
 An abstract class can extend only one
class or one abstract class at a time.
 An interface can extend any number of
interfaces at a time.
 An abstract class can extend another
concrete (regular) class or abstract class.
 An interface can only extend another
interface.
 An abstract class can have both abstract
and concrete methods.
 An interface can have only abstract
methods.
 An abstract class can have protected and
public abstract methods
 An interface can have only have public
abstract methods
Interface
Software
Learning
Tutorials !!!
To be continued…!!!
Package
Software
Learning
Tutorials !!!
import java.util.Scanner
Here:
→ java is a top level package
→ util is a sub package
→ Scanner is a class which is present in the sub package util
Reusability: While developing a project in java, we often feel that there
are few things that we are writing repeatedly in our code.
Better Organization: In large java projects where we have several
hundreds of class.
Name Conflicts: We can define two classes with the same name in
different packages so to avoid name collision.
To be continued…!!!
Package
Software
Learning
Tutorials !!!
Modifier
Software
Learning
Tutorials !!!
Modifiers are keywords that you
add to those definitions to
change their meanings. Java
language has a wide variety of
modifiers.
Access Modifiers: Default, Private, Protected, Public
Non-Access Modifiers: Static, Final, Abstract
Access Layer Default Private Protected Public
Same Class Yes Yes Yes Yes
Same Package – Sub Class Yes No Yes Yes
Same Package – Non Sub Class Yes No Yes Yes
Different Package – Sub Class No No Yes Yes
Different Package – Non Sub Class No No No Yes
OOPS Concepts
Software
Learning
Tutorials !!!
Inheritance Encapsulation
Abstraction Polymorphism
OOPS
To be continued…!!!
OOPS - Inheritance
Software
Learning
Tutorials !!!
Inheritance means accessing one-class properties from another class.
Class C Class D
Class B
Class A
Class C
Class D
Class B
Class A
Single
Inheritance
Hierarchical
Inheritance
Multiple
Inheritance
Valid by Both: Class & Interface Invalid by Class, Valid by Interface
OOPS - Encapsulation
Software
Learning
Tutorials !!!
Encapsulation is a mechanism where you bind your data and code together as a single unit
VariablesMethodsClass
Encapsulation
 We can achieve encapsulation in Java by:
 Declaring the variables of a class as private.
 Providing public setter and getter methods to modify and view the variables values
OOPS - Abstraction
Software
Learning
Tutorials !!!
Abstraction is the process in Java used to hide certain details and only show the essentials
features of the objects.
Abstract Class Interface
Software
Learning
Tutorials !!!
OOPS - Polymorphism
Polymorphism means taking many forms, where ‘poly’ means many and ‘morph’ means forms.
References
https://www.tutorialspoint.com/
https://www.geeksforgeeks.org/
https://www.techopedia.com/
https://www.guru99.com/
https://beginnersbook.com/
https://www.edureka.co/
Software
Learning
Tutorials !!!
Software
Learning
Tutorials !!!
YouTube Channel: Software Learning Tutorials - SLT!!!
https://www.youtube.com/channel/UC_FRkF_0i_YgbFNqzRZ-Nmg

More Related Content

What's hot

INTRODUCTION TO JAVA APPLICATION
INTRODUCTION TO JAVA APPLICATIONINTRODUCTION TO JAVA APPLICATION
INTRODUCTION TO JAVA APPLICATIONAjit Yadav
 
Genesis and Overview of Java
Genesis and Overview of Java Genesis and Overview of Java
Genesis and Overview of Java Ravi_Kant_Sahu
 
Features of JAVA Programming Language.
Features of JAVA Programming Language.Features of JAVA Programming Language.
Features of JAVA Programming Language.Bhautik Jethva
 
Object Oriented Programming - 3. Java Programming
Object Oriented Programming - 3. Java ProgrammingObject Oriented Programming - 3. Java Programming
Object Oriented Programming - 3. Java ProgrammingAndiNurkholis1
 
Introduction to Java Programming
Introduction to Java Programming Introduction to Java Programming
Introduction to Java Programming Saravanakumar R
 
What is Interface in Java | How to implement Multiple Inheritance Using Inter...
What is Interface in Java | How to implement Multiple Inheritance Using Inter...What is Interface in Java | How to implement Multiple Inheritance Using Inter...
What is Interface in Java | How to implement Multiple Inheritance Using Inter...Edureka!
 
Features of java - javatportal
Features of java - javatportalFeatures of java - javatportal
Features of java - javatportalJavaTportal
 
Java Introduction
Java IntroductionJava Introduction
Java Introductionjaveed_mhd
 
Presentation on Core java
Presentation on Core javaPresentation on Core java
Presentation on Core javamahir jain
 

What's hot (20)

INTRODUCTION TO JAVA APPLICATION
INTRODUCTION TO JAVA APPLICATIONINTRODUCTION TO JAVA APPLICATION
INTRODUCTION TO JAVA APPLICATION
 
Java seminar
Java seminarJava seminar
Java seminar
 
Chapter 1
Chapter 1Chapter 1
Chapter 1
 
Genesis and Overview of Java
Genesis and Overview of Java Genesis and Overview of Java
Genesis and Overview of Java
 
core java
core javacore java
core java
 
Features of JAVA Programming Language.
Features of JAVA Programming Language.Features of JAVA Programming Language.
Features of JAVA Programming Language.
 
Object Oriented Programming - 3. Java Programming
Object Oriented Programming - 3. Java ProgrammingObject Oriented Programming - 3. Java Programming
Object Oriented Programming - 3. Java Programming
 
Introduction to Java Programming
Introduction to Java Programming Introduction to Java Programming
Introduction to Java Programming
 
Java for C++ programers
Java for C++ programersJava for C++ programers
Java for C++ programers
 
Core java course syllabus
Core java course syllabusCore java course syllabus
Core java course syllabus
 
What is Interface in Java | How to implement Multiple Inheritance Using Inter...
What is Interface in Java | How to implement Multiple Inheritance Using Inter...What is Interface in Java | How to implement Multiple Inheritance Using Inter...
What is Interface in Java | How to implement Multiple Inheritance Using Inter...
 
Features of java - javatportal
Features of java - javatportalFeatures of java - javatportal
Features of java - javatportal
 
Java Programming Fundamentals
Java Programming Fundamentals Java Programming Fundamentals
Java Programming Fundamentals
 
Java Introduction
Java IntroductionJava Introduction
Java Introduction
 
Inheritance
InheritanceInheritance
Inheritance
 
Core java
Core javaCore java
Core java
 
Java Programming
Java ProgrammingJava Programming
Java Programming
 
C sharp
C sharpC sharp
C sharp
 
Presentation on Core java
Presentation on Core javaPresentation on Core java
Presentation on Core java
 
Java programming course for beginners
Java programming course for beginnersJava programming course for beginners
Java programming course for beginners
 

Similar to Automation Testing - Part 2 (Things to know in JAVA) - SLT

Packages and Interfaces
Packages and InterfacesPackages and Interfaces
Packages and InterfacesAkashDas112
 
Classes and Objects
Classes and ObjectsClasses and Objects
Classes and Objectsvmadan89
 
Intro Java Rev010
Intro Java Rev010Intro Java Rev010
Intro Java Rev010Rich Helton
 
Java interview-quetions
Java interview-quetionsJava interview-quetions
Java interview-quetionsMehtaacademy
 
Elements of Java Language
Elements of Java Language Elements of Java Language
Elements of Java Language Hitesh-Java
 
OOP in Java Presentation.pptx
OOP in Java Presentation.pptxOOP in Java Presentation.pptx
OOP in Java Presentation.pptxmrxyz19
 
Introduction to Java Programming.pdf
Introduction to Java Programming.pdfIntroduction to Java Programming.pdf
Introduction to Java Programming.pdfAdiseshaK
 
Android interview questions
Android interview questionsAndroid interview questions
Android interview questionssatish reddy
 
Android interview questions
Android interview questionsAndroid interview questions
Android interview questionssatish reddy
 
C#.net interview questions for dynamics 365 ce crm developers
C#.net interview questions for dynamics 365 ce crm developersC#.net interview questions for dynamics 365 ce crm developers
C#.net interview questions for dynamics 365 ce crm developersSanjaya Prakash Pradhan
 
Chapter1pp
Chapter1ppChapter1pp
Chapter1ppJ. C.
 
Unit1 introduction to Java
Unit1 introduction to JavaUnit1 introduction to Java
Unit1 introduction to JavaDevaKumari Vijay
 
Java Interview Questions
Java Interview QuestionsJava Interview Questions
Java Interview QuestionsKuntal Bhowmick
 

Similar to Automation Testing - Part 2 (Things to know in JAVA) - SLT (20)

Java_notes.ppt
Java_notes.pptJava_notes.ppt
Java_notes.ppt
 
Packages and Interfaces
Packages and InterfacesPackages and Interfaces
Packages and Interfaces
 
Classes and Objects
Classes and ObjectsClasses and Objects
Classes and Objects
 
1
11
1
 
Core_Java_Interview.pdf
Core_Java_Interview.pdfCore_Java_Interview.pdf
Core_Java_Interview.pdf
 
Intro Java Rev010
Intro Java Rev010Intro Java Rev010
Intro Java Rev010
 
Java interview-quetions
Java interview-quetionsJava interview-quetions
Java interview-quetions
 
Java_presesntation.ppt
Java_presesntation.pptJava_presesntation.ppt
Java_presesntation.ppt
 
Elements of Java Language
Elements of Java Language Elements of Java Language
Elements of Java Language
 
OOP in Java Presentation.pptx
OOP in Java Presentation.pptxOOP in Java Presentation.pptx
OOP in Java Presentation.pptx
 
Introduction to Java Programming.pdf
Introduction to Java Programming.pdfIntroduction to Java Programming.pdf
Introduction to Java Programming.pdf
 
Android interview questions
Android interview questionsAndroid interview questions
Android interview questions
 
Android interview questions
Android interview questionsAndroid interview questions
Android interview questions
 
C#.net interview questions for dynamics 365 ce crm developers
C#.net interview questions for dynamics 365 ce crm developersC#.net interview questions for dynamics 365 ce crm developers
C#.net interview questions for dynamics 365 ce crm developers
 
Chapter1pp
Chapter1ppChapter1pp
Chapter1pp
 
Java fundamentals 2
Java fundamentals 2Java fundamentals 2
Java fundamentals 2
 
Unusual C# - OOP
Unusual C# - OOPUnusual C# - OOP
Unusual C# - OOP
 
Unit1 introduction to Java
Unit1 introduction to JavaUnit1 introduction to Java
Unit1 introduction to Java
 
The smartpath information systems java
The smartpath information systems javaThe smartpath information systems java
The smartpath information systems java
 
Java Interview Questions
Java Interview QuestionsJava Interview Questions
Java Interview Questions
 

Recently uploaded

Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfCionsystems
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 

Recently uploaded (20)

Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdf
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 

Automation Testing - Part 2 (Things to know in JAVA) - SLT

  • 1. Presenter & Creator :- Ankit D. Prajapati Skype: SoftwareLearningTutorials Email: SoftwareLearningTutorials@gmail.com WhatsApp: +91-7383908668 Software Learning Tutorials !!! YouTube Channel: Software Learning Tutorials – SLT !!! https://www.youtube.com/channel/UC_FRkF_0i_YgbFNqzRZ-Nmg
  • 2. Agenda  What is JAVA?  What make JAVA Popular?  Class, Object & Method  Interface & Package  Modifiers  OOPS Concepts  References Software Learning Tutorials !!!
  • 3. What is JAVA ? Software Learning Tutorials !!! Java is a programming language that produces software for multiple platforms. Java derives much of its syntax from the C and C++ programming languages. It was first released by Sun Microsystem in 1995 and later acquired by Oracle Corporation Java platform includes an execution engine, a compiler, and a set of libraries.
  • 4. What make JAVA Popular ? Software Learning Tutorials !!! JAVA OOPS High Performance Secure Robust Platform Independent Multi Threaded
  • 5. Class – Object – Method Software Learning Tutorials !!! Class is a user defined blueprint or prototype from which objects are created. Object is an instance of Class. States & Behaviours Method is a collection of statements that are grouped together to perform an operation To be continued…!!!
  • 6. Class – Object – Method Software Learning Tutorials !!!
  • 7. Interface & Packages Software Learning Tutorials !!! To be continued…!!! Interface: An interface is just like Java Class, but it only has static constants and abstract method. A class implements an interface, thereby inheriting the abstract methods of the interface. Package as the name suggests is a pack (group) of classes, interfaces and other packages. In java we use packages to organize our classes and interfaces
  • 8. Interface & Abstract Class Software Learning Tutorials !!! To be continued…!!!  Java uses Interface to implement multiple inheritance.  A Java class can implement multiple Java Interfaces.  Class contains ‘Abstract’ keyword.  If a class is declared abstract, it cannot be instantiated, which means you cannot create an object of an abstract class. Abstract Class Interface  An abstract class can extend only one class or one abstract class at a time.  An interface can extend any number of interfaces at a time.  An abstract class can extend another concrete (regular) class or abstract class.  An interface can only extend another interface.  An abstract class can have both abstract and concrete methods.  An interface can have only abstract methods.  An abstract class can have protected and public abstract methods  An interface can have only have public abstract methods
  • 10. Package Software Learning Tutorials !!! import java.util.Scanner Here: → java is a top level package → util is a sub package → Scanner is a class which is present in the sub package util Reusability: While developing a project in java, we often feel that there are few things that we are writing repeatedly in our code. Better Organization: In large java projects where we have several hundreds of class. Name Conflicts: We can define two classes with the same name in different packages so to avoid name collision. To be continued…!!!
  • 12. Modifier Software Learning Tutorials !!! Modifiers are keywords that you add to those definitions to change their meanings. Java language has a wide variety of modifiers. Access Modifiers: Default, Private, Protected, Public Non-Access Modifiers: Static, Final, Abstract Access Layer Default Private Protected Public Same Class Yes Yes Yes Yes Same Package – Sub Class Yes No Yes Yes Same Package – Non Sub Class Yes No Yes Yes Different Package – Sub Class No No Yes Yes Different Package – Non Sub Class No No No Yes
  • 13. OOPS Concepts Software Learning Tutorials !!! Inheritance Encapsulation Abstraction Polymorphism OOPS To be continued…!!!
  • 14. OOPS - Inheritance Software Learning Tutorials !!! Inheritance means accessing one-class properties from another class. Class C Class D Class B Class A Class C Class D Class B Class A Single Inheritance Hierarchical Inheritance Multiple Inheritance Valid by Both: Class & Interface Invalid by Class, Valid by Interface
  • 15. OOPS - Encapsulation Software Learning Tutorials !!! Encapsulation is a mechanism where you bind your data and code together as a single unit VariablesMethodsClass Encapsulation  We can achieve encapsulation in Java by:  Declaring the variables of a class as private.  Providing public setter and getter methods to modify and view the variables values
  • 16. OOPS - Abstraction Software Learning Tutorials !!! Abstraction is the process in Java used to hide certain details and only show the essentials features of the objects. Abstract Class Interface
  • 17. Software Learning Tutorials !!! OOPS - Polymorphism Polymorphism means taking many forms, where ‘poly’ means many and ‘morph’ means forms.
  • 19. Software Learning Tutorials !!! YouTube Channel: Software Learning Tutorials - SLT!!! https://www.youtube.com/channel/UC_FRkF_0i_YgbFNqzRZ-Nmg