SlideShare a Scribd company logo
2
Most read
4
Most read
5
Most read
ACCESS
SPECIFIERS(MODIFIERS)
IN JAVA
PRESENTED BY :
HRITHIK SHINDE
PRAJWAL POOJARI
MANNU VISHWAKARMA
DEFINATION : ACCESS
SPECIFIERS
Access specifiers(or access modifiers) are keywords in
object-oriented languages that sets the accessibility of the
classes , methods and others members
.
THERE ARE 4 TYPES OF JAVA ACCESS SPECIFIERS:
i. DEFAULT
ii.PRIVATE
iii.PROTECTED
iv.PUBLIC
.
1]DEFAULT ACCESS SPECIFIER:
No keyword is required to specify default
access specifier
When no access modifier is specified for a
class, method or data member it is said to be
having the default access specifier by default.
Default access specifier are accessible within
the same package.
.2]PRIVATE ACCESS SPECIFIER:
 The private access specifier is specified using the
keyword private.
 The methods or data members declared as private
are accessible only within the class in which they are
declared.
 Any other class of same package will not be able to
access these members.
 Classes or interface can not be declared as private.
.3]PROTECTED ACCESS
SPECIFIER:
The protected access specifier is specified
using the keyword protected.
The methods or data members declared as
protected are accessible within same package
or sub classes in different package.
.4]PUBLIC ACCESS SPECIFIER:
 The public access specifier is specified using the
keyword public.
 The public access specifier has the widest scope
among all other access modifiers.
 Classes, methods or data members which are
declared as public are accessible from every where in
the program. There is no restriction on the scope of
a public data members.
ACCESS LEVELS
Specifier Class Package Subclass Everywhere
Default Y Y N N
Private Y N N N
Protected Y Y Y N
Public Y Y Y Y
Access specifiers(modifiers) in java

More Related Content

PPTX
Kerala Tourism
PPTX
Access Modifier.pptx
PPTX
Normalization in DBMS
PPTX
Object Oriented Programming
PPTX
WEB Scraping.pptx
PPTX
Strings in Java
PPTX
Static keyword ppt
PPT
Method overriding
Kerala Tourism
Access Modifier.pptx
Normalization in DBMS
Object Oriented Programming
WEB Scraping.pptx
Strings in Java
Static keyword ppt
Method overriding

What's hot (20)

PPTX
Inheritance in java
PPTX
PPTX
Method overloading
PPTX
Interface in java
PDF
Java I/o streams
PPTX
Java package
PPTX
PPTX
Applets in java
PPT
Introduction to method overloading & method overriding in java hdm
PPTX
Constructor in java
PPT
Java interfaces
PPTX
Pure virtual function and abstract class
PPS
Java Exception handling
PPTX
Classes, objects in JAVA
PDF
Polymorphism In Java
PPTX
Super Keyword in Java.pptx
PDF
Arrays in Java
PPTX
Type casting in java
PPTX
Arrays in Java
PPT
Java tutorial PPT
Inheritance in java
Method overloading
Interface in java
Java I/o streams
Java package
Applets in java
Introduction to method overloading & method overriding in java hdm
Constructor in java
Java interfaces
Pure virtual function and abstract class
Java Exception handling
Classes, objects in JAVA
Polymorphism In Java
Super Keyword in Java.pptx
Arrays in Java
Type casting in java
Arrays in Java
Java tutorial PPT
Ad

Similar to Access specifiers(modifiers) in java (20)

PPTX
Access modifiers in java
PPTX
Access modifier and inheritance
PPTX
C# Access modifiers
PPTX
Access Modifiers in Java.pptx
PPTX
Access Modifiers .pptx
PDF
Java modifiers
PDF
Access modifiers in java
PPTX
Visibility Modifiers for Access Control.pptx
PPT
D2 Object Oriented Programming
PPT
Access Protection
PDF
PPTX
Power point presentation on access specifier in OOPs
PPTX
How totestinternalprotectmethodsinc#
PDF
Access Modifiers To set the access levels of variables,methods (mem.pdf
PPTX
Unit-4 Day1.pptx
DOCX
3) Distinguish among various methods to implement access controlsSolut.docx
PDF
Oops (inheritance&interface)
PPTX
web programmimg ppt which is about the java packages
PPTX
PPTX
27csharp
Access modifiers in java
Access modifier and inheritance
C# Access modifiers
Access Modifiers in Java.pptx
Access Modifiers .pptx
Java modifiers
Access modifiers in java
Visibility Modifiers for Access Control.pptx
D2 Object Oriented Programming
Access Protection
Power point presentation on access specifier in OOPs
How totestinternalprotectmethodsinc#
Access Modifiers To set the access levels of variables,methods (mem.pdf
Unit-4 Day1.pptx
3) Distinguish among various methods to implement access controlsSolut.docx
Oops (inheritance&interface)
web programmimg ppt which is about the java packages
27csharp
Ad

Recently uploaded (20)

PDF
Enhancing Bambara Groundnut Production Through Improved Agronomic Practices
PPTX
Postmodernism notes for literature students
PPTX
Understanding-Communication-Berlos-S-M-C-R-Model.pptx
PPTX
2025-08-03 Joseph 01 (shared slides).pptx
PPTX
Learning-Plan-5-Policies-and-Practices.pptx
PPTX
Non-Verbal-Communication .mh.pdf_110245_compressed.pptx
PPTX
business communication final draftt.pptx
PPTX
Assam' Vibrant Bihu Festival Bihu presentation.pptx
PPTX
Information Security and Risk Management.pptx
PPTX
What is Clause, definition and structure
PPTX
Selecting relevant value chain/s for Impactful Development Policies
PPTX
Presentation of Project of Enterprenuership topic- "Green Gaurdian"
PPTX
Bob Stewart Journey to Rome 07 30 2025.pptx
PPTX
Cohort Study_PPT.group presentation_pdf.pptx
PPTX
Role and Responsibilities of Bangladesh Coast Guard Base, Mongla Challenges
PPTX
DARKWEB Deepweb what to do or not ?.pptx
PPTX
PHILIPPINE LITERATURE DURING SPANISH ERA
PDF
Parts of Speech Prepositions Presentation in Colorful Cute Style_20250724_230...
PDF
protein structure and function for basics .pdf
PPTX
IBA DISTRICT PIR PRESENTATION.POWERPOINT
Enhancing Bambara Groundnut Production Through Improved Agronomic Practices
Postmodernism notes for literature students
Understanding-Communication-Berlos-S-M-C-R-Model.pptx
2025-08-03 Joseph 01 (shared slides).pptx
Learning-Plan-5-Policies-and-Practices.pptx
Non-Verbal-Communication .mh.pdf_110245_compressed.pptx
business communication final draftt.pptx
Assam' Vibrant Bihu Festival Bihu presentation.pptx
Information Security and Risk Management.pptx
What is Clause, definition and structure
Selecting relevant value chain/s for Impactful Development Policies
Presentation of Project of Enterprenuership topic- "Green Gaurdian"
Bob Stewart Journey to Rome 07 30 2025.pptx
Cohort Study_PPT.group presentation_pdf.pptx
Role and Responsibilities of Bangladesh Coast Guard Base, Mongla Challenges
DARKWEB Deepweb what to do or not ?.pptx
PHILIPPINE LITERATURE DURING SPANISH ERA
Parts of Speech Prepositions Presentation in Colorful Cute Style_20250724_230...
protein structure and function for basics .pdf
IBA DISTRICT PIR PRESENTATION.POWERPOINT

Access specifiers(modifiers) in java

  • 1. ACCESS SPECIFIERS(MODIFIERS) IN JAVA PRESENTED BY : HRITHIK SHINDE PRAJWAL POOJARI MANNU VISHWAKARMA
  • 2. DEFINATION : ACCESS SPECIFIERS Access specifiers(or access modifiers) are keywords in object-oriented languages that sets the accessibility of the classes , methods and others members
  • 3. . THERE ARE 4 TYPES OF JAVA ACCESS SPECIFIERS: i. DEFAULT ii.PRIVATE iii.PROTECTED iv.PUBLIC
  • 4. . 1]DEFAULT ACCESS SPECIFIER: No keyword is required to specify default access specifier When no access modifier is specified for a class, method or data member it is said to be having the default access specifier by default. Default access specifier are accessible within the same package.
  • 5. .2]PRIVATE ACCESS SPECIFIER:  The private access specifier is specified using the keyword private.  The methods or data members declared as private are accessible only within the class in which they are declared.  Any other class of same package will not be able to access these members.  Classes or interface can not be declared as private.
  • 6. .3]PROTECTED ACCESS SPECIFIER: The protected access specifier is specified using the keyword protected. The methods or data members declared as protected are accessible within same package or sub classes in different package.
  • 7. .4]PUBLIC ACCESS SPECIFIER:  The public access specifier is specified using the keyword public.  The public access specifier has the widest scope among all other access modifiers.  Classes, methods or data members which are declared as public are accessible from every where in the program. There is no restriction on the scope of a public data members.
  • 8. ACCESS LEVELS Specifier Class Package Subclass Everywhere Default Y Y N N Private Y N N N Protected Y Y Y N Public Y Y Y Y