SlideShare a Scribd company logo
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 APPLICATION
Ajit Yadav
 
Java seminar
Java seminarJava seminar
Java seminar
Santoshsingh616
 
Chapter 1
Chapter 1Chapter 1
Chapter 1
siragezeynu
 
Genesis and Overview of Java
Genesis and Overview of Java Genesis and Overview of Java
Genesis and Overview of Java Ravi_Kant_Sahu
 
core java
core javacore java
core java
Roushan Sinha
 
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 Programming
AndiNurkholis1
 
Introduction to Java Programming
Introduction to Java Programming Introduction to Java Programming
Introduction to Java Programming
Saravanakumar R
 
Java for C++ programers
Java for C++ programersJava for C++ programers
Java for C++ programers
Salahaddin University-Erbil
 
Core java course syllabus
Core java course syllabusCore java course syllabus
Core java course syllabus
Papitha Velumani
 
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 - javatportal
JavaTportal
 
Java Programming Fundamentals
Java Programming Fundamentals Java Programming Fundamentals
Java Programming Fundamentals
Dr. Rosemarie Sibbaluca-Guirre
 
Java Introduction
Java IntroductionJava Introduction
Java Introduction
javeed_mhd
 
Inheritance
InheritanceInheritance
Inheritance
pooja_doshi
 
Core java
Core javaCore java
Core java
sharad soni
 
Java Programming
Java ProgrammingJava Programming
Java Programming
Prof. Dr. K. Adisesha
 
C sharp
C sharpC sharp
C sharp
Ahmed Vic
 
Presentation on Core java
Presentation on Core javaPresentation on Core java
Presentation on Core java
mahir jain
 
Java programming course for beginners
Java programming course for beginnersJava programming course for beginners
Java programming course for beginners
Eduonix Learning Solutions
 

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

Java_notes.ppt
Java_notes.pptJava_notes.ppt
Java_notes.ppt
tuyambazejeanclaude
 
Packages and Interfaces
Packages and InterfacesPackages and Interfaces
Packages and Interfaces
AkashDas112
 
Classes and Objects
Classes and ObjectsClasses and Objects
Classes and Objects
vmadan89
 
1
11
Core_Java_Interview.pdf
Core_Java_Interview.pdfCore_Java_Interview.pdf
Core_Java_Interview.pdf
ansariparveen06
 
Intro Java Rev010
Intro Java Rev010Intro Java Rev010
Intro Java Rev010Rich Helton
 
Java interview-quetions
Java interview-quetionsJava interview-quetions
Java interview-quetions
Mehtaacademy
 
Java_presesntation.ppt
Java_presesntation.pptJava_presesntation.ppt
Java_presesntation.ppt
VGaneshKarthikeyan
 
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.pptx
mrxyz19
 
Introduction to Java Programming.pdf
Introduction to Java Programming.pdfIntroduction to Java Programming.pdf
Introduction to Java Programming.pdf
AdiseshaK
 
Android interview questions
Android interview questionsAndroid interview questions
Android interview questions
satish reddy
 
Android interview questions
Android interview questionsAndroid interview questions
Android interview questions
satish 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 developers
Sanjaya Prakash Pradhan
 
Chapter1pp
Chapter1ppChapter1pp
Chapter1ppJ. C.
 
Java fundamentals 2
Java fundamentals 2Java fundamentals 2
Java fundamentals 2
prathushalaxmi
 
Unusual C# - OOP
Unusual C# - OOPUnusual C# - OOP
Unusual C# - OOP
Medhat Dawoud
 
Unit1 introduction to Java
Unit1 introduction to JavaUnit1 introduction to Java
Unit1 introduction to Java
DevaKumari Vijay
 
The smartpath information systems java
The smartpath information systems javaThe smartpath information systems java
The smartpath information systems java
The Smartpath Information Systems,Bhilai,Durg,Chhattisgarh.
 
Java Interview Questions
Java Interview QuestionsJava Interview Questions
Java Interview Questions
Kuntal 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

SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
kalichargn70th171
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
Juraj Vysvader
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
Globus
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus
 
RISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent EnterpriseRISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent Enterprise
Srikant77
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
Google
 
Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
e20449
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
Globus
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
takuyayamamoto1800
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
vrstrong314
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
Ortus Solutions, Corp
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Globus
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Globus
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Globus
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
Matt Welsh
 

Recently uploaded (20)

SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 
RISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent EnterpriseRISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent Enterprise
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
 
Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
 

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