SlideShare a Scribd company logo
Java(Access Modifiers)
Java(Access Modifiers)
 Final 
 Synchronized 
 Abstract 
 static
 The final keyword prevents a method from being overridden 
in a subclass 
class SuperClass{ 
public final void showSample() 
{ 
System.out.println("One thing."); 
} 
} 
class SubClass extends SuperClass{ 
public void showSample() 
{ 
// Try to override the final 
// superclass method 
System.out.println("Another thing."); 
} 
}
class Bank 
{ 
int accountBalance ; 
public Bank(){ 
accountbalance = 10000; 
} 
Synchronized void BalanceInquiry(){ 
System.out.println(“account 
balance is :”+accountbalance); 
} 
}
abstract class Hotel 
{ 
public void Idli(){ 
System.out.println(“Prepare Idli”); 
} 
abstract public void Dosa(); 
}
class Pageview 
{ 
public static final int count = 0; 
public Pageview() 
{ 
count++; 
System.out.println(“Number of views 
to website”+count); 
} 
public static void main(String args[]) 
{ 
Pageview p = new Pageview(); 
} 
}
 Arithmetic Operators 
 Relational Operators 
 Bitwise Operators 
 Logical Operators 
 Assignment Operators
Java(Access Modifiers)
Java(Access Modifiers)
Java(Access Modifiers)
Java(Access Modifiers)
Java(Access Modifiers)
Java(Access Modifiers)
Java(Access Modifiers)
 Bitwise operator works on bits and performs bit-by-bit operation. Assume 
if a = 60; and b = 13; now in binary format they will be as follows: 
 a = 0011 1100 
 b = 0000 1101 
 ------------------------------------------------------------------------------------------ 
 a & b = 0000 1100 
 a || b = 0011 1101 
 a ^ b = 0011 0001 
 ~a = 1100 0011
Java(Access Modifiers)
Java(Access Modifiers)
Java(Access Modifiers)
Java(Access Modifiers)
Java(Access Modifiers)
Java(Access Modifiers)
Java(Access Modifiers)
Java(Access Modifiers)
 Conditional Operators are also called ternary 
operator 
 This operator consists of three operands. 
 It is used to evaluate an expressions 
 Syntax: 
variable x = (expression) ? value if true : value if 
false
public class Test{ 
public static void main(String args[]) 
{ 
int a, b; 
a = 10; 
b = 20; 
( a > b ) ? a : b ; 
( a <10 ) ? a : b ; 
} 
}
 Methods declared public in a superclass also must be public in 
all subclasses. 
 Methods declared protected in a superclass must either be 
protected or public in subclasses; they cannot be private. 
 Methods declared without access control (no modifier was 
used) can be declared more private in subclasses. 
 Methods declared private are not inherited at all, so there is no 
rule for them.
Java(Access Modifiers)
Ad

More Related Content

What's hot (20)

Immutability and Javascript - Nadia Miętkiewicz
Immutability and Javascript - Nadia MiętkiewiczImmutability and Javascript - Nadia Miętkiewicz
Immutability and Javascript - Nadia Miętkiewicz
Visuality
 
Operators in C & C++ Language
Operators in C & C++ LanguageOperators in C & C++ Language
Operators in C & C++ Language
PreSolutions Softwares
 
Presentation on logical_operators
Presentation on logical_operatorsPresentation on logical_operators
Presentation on logical_operators
CoT
 
Functions
FunctionsFunctions
Functions
biplob04
 
Chapter 5 Basic operators in programming
Chapter 5   Basic operators in programmingChapter 5   Basic operators in programming
Chapter 5 Basic operators in programming
Pro Guide
 
Compiler Construction for DLX Processor
Compiler Construction for DLX Processor Compiler Construction for DLX Processor
Compiler Construction for DLX Processor
Soham Kulkarni
 
Flowcharting
FlowchartingFlowcharting
Flowcharting
Michael Jarata
 
Array menu
Array menuArray menu
Array menu
Sayantan Sur
 
20120810 tsql tips
20120810 tsql tips20120810 tsql tips
20120810 tsql tips
LearningTech
 
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAMPROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
SaraswathiRamalingam
 
Loop Statements [5] M
Loop Statements [5] MLoop Statements [5] M
Loop Statements [5] M
ecko_disasterz
 
Java 2
Java 2Java 2
Java 2
Ahmed Hesham
 
Flow Chart & Input Output Statement [3] M
Flow Chart & Input Output Statement [3] MFlow Chart & Input Output Statement [3] M
Flow Chart & Input Output Statement [3] M
ecko_disasterz
 
Control statements in java programmng
Control statements in java programmngControl statements in java programmng
Control statements in java programmng
Savitribai Phule Pune University
 
Stack1
Stack1Stack1
Stack1
Iqrazb
 
Java this keyword ppt with example
Java this keyword ppt with exampleJava this keyword ppt with example
Java this keyword ppt with example
Pavan b
 
Basics of c programming cit r.sandhiya
Basics of c programming  cit r.sandhiyaBasics of c programming  cit r.sandhiya
Basics of c programming cit r.sandhiya
Dr.Sandhiya Ravi
 
Api error handling
Api error handlingApi error handling
Api error handling
suriyae1
 
4. operators in c programming by digital wave
4. operators in  c programming by digital wave4. operators in  c programming by digital wave
4. operators in c programming by digital wave
RahulSharma4566
 
Functions oracle (pl/sql)
Functions oracle (pl/sql)Functions oracle (pl/sql)
Functions oracle (pl/sql)
harman kaur
 
Immutability and Javascript - Nadia Miętkiewicz
Immutability and Javascript - Nadia MiętkiewiczImmutability and Javascript - Nadia Miętkiewicz
Immutability and Javascript - Nadia Miętkiewicz
Visuality
 
Presentation on logical_operators
Presentation on logical_operatorsPresentation on logical_operators
Presentation on logical_operators
CoT
 
Chapter 5 Basic operators in programming
Chapter 5   Basic operators in programmingChapter 5   Basic operators in programming
Chapter 5 Basic operators in programming
Pro Guide
 
Compiler Construction for DLX Processor
Compiler Construction for DLX Processor Compiler Construction for DLX Processor
Compiler Construction for DLX Processor
Soham Kulkarni
 
20120810 tsql tips
20120810 tsql tips20120810 tsql tips
20120810 tsql tips
LearningTech
 
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAMPROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
SaraswathiRamalingam
 
Flow Chart & Input Output Statement [3] M
Flow Chart & Input Output Statement [3] MFlow Chart & Input Output Statement [3] M
Flow Chart & Input Output Statement [3] M
ecko_disasterz
 
Stack1
Stack1Stack1
Stack1
Iqrazb
 
Java this keyword ppt with example
Java this keyword ppt with exampleJava this keyword ppt with example
Java this keyword ppt with example
Pavan b
 
Basics of c programming cit r.sandhiya
Basics of c programming  cit r.sandhiyaBasics of c programming  cit r.sandhiya
Basics of c programming cit r.sandhiya
Dr.Sandhiya Ravi
 
Api error handling
Api error handlingApi error handling
Api error handling
suriyae1
 
4. operators in c programming by digital wave
4. operators in  c programming by digital wave4. operators in  c programming by digital wave
4. operators in c programming by digital wave
RahulSharma4566
 
Functions oracle (pl/sql)
Functions oracle (pl/sql)Functions oracle (pl/sql)
Functions oracle (pl/sql)
harman kaur
 

Viewers also liked (20)

Access modifiers in java
Access modifiers in javaAccess modifiers in java
Access modifiers in java
Sourabrata Mukherjee
 
Access modifiers in java
Access modifiers in javaAccess modifiers in java
Access modifiers in java
Muthukumaran Subramanian
 
Java access modifiers
Java access modifiersJava access modifiers
Java access modifiers
Srinivas Reddy
 
12 java modifiers
12 java modifiers12 java modifiers
12 java modifiers
Federico Russo
 
Visibility control in java
Visibility control in javaVisibility control in java
Visibility control in java
Tech_MX
 
Access specifier in java
Access specifier in javaAccess specifier in java
Access specifier in java
Kaml Sah
 
Introduction to DFT Part 1
Introduction to DFT Part 1 Introduction to DFT Part 1
Introduction to DFT Part 1
Mariana M. Odashima
 
Dft and its applications
Dft and its applicationsDft and its applications
Dft and its applications
Agam Goel
 
6. static keyword
6. static keyword6. static keyword
6. static keyword
Indu Sharma Bhardwaj
 
The Fast Fourier Transform (FFT)
The Fast Fourier Transform (FFT)The Fast Fourier Transform (FFT)
The Fast Fourier Transform (FFT)
Oka Danil
 
Java static keyword
Java static keywordJava static keyword
Java static keyword
Ahmed Shawky El-faky
 
Static keyword ppt
Static keyword pptStatic keyword ppt
Static keyword ppt
Vinod Kumar
 
Java interfaces & abstract classes
Java interfaces & abstract classesJava interfaces & abstract classes
Java interfaces & abstract classes
Shreyans Pathak
 
Packages and inbuilt classes of java
Packages and inbuilt classes of javaPackages and inbuilt classes of java
Packages and inbuilt classes of java
kamal kotecha
 
Packages in java
Packages in javaPackages in java
Packages in java
Abhishek Khune
 
JDBC Tutorial
JDBC TutorialJDBC Tutorial
JDBC Tutorial
Information Technology
 
Java packages
Java packagesJava packages
Java packages
BHUVIJAYAVELU
 
Packages and interfaces
Packages and interfacesPackages and interfaces
Packages and interfaces
vanithaRamasamy
 
JDBC: java DataBase connectivity
JDBC: java DataBase connectivityJDBC: java DataBase connectivity
JDBC: java DataBase connectivity
Tanmoy Barman
 
Fast Fourier Transform
Fast Fourier TransformFast Fourier Transform
Fast Fourier Transform
op205
 
Visibility control in java
Visibility control in javaVisibility control in java
Visibility control in java
Tech_MX
 
Access specifier in java
Access specifier in javaAccess specifier in java
Access specifier in java
Kaml Sah
 
Dft and its applications
Dft and its applicationsDft and its applications
Dft and its applications
Agam Goel
 
The Fast Fourier Transform (FFT)
The Fast Fourier Transform (FFT)The Fast Fourier Transform (FFT)
The Fast Fourier Transform (FFT)
Oka Danil
 
Static keyword ppt
Static keyword pptStatic keyword ppt
Static keyword ppt
Vinod Kumar
 
Java interfaces & abstract classes
Java interfaces & abstract classesJava interfaces & abstract classes
Java interfaces & abstract classes
Shreyans Pathak
 
Packages and inbuilt classes of java
Packages and inbuilt classes of javaPackages and inbuilt classes of java
Packages and inbuilt classes of java
kamal kotecha
 
JDBC: java DataBase connectivity
JDBC: java DataBase connectivityJDBC: java DataBase connectivity
JDBC: java DataBase connectivity
Tanmoy Barman
 
Fast Fourier Transform
Fast Fourier TransformFast Fourier Transform
Fast Fourier Transform
op205
 
Ad

Similar to Java(Access Modifiers) (20)

Java 8 lambda expressions
Java 8 lambda expressionsJava 8 lambda expressions
Java 8 lambda expressions
Logan Chien
 
5_Operators.pdf
5_Operators.pdf5_Operators.pdf
5_Operators.pdf
NiraliArora2
 
eee2-day4-structures engineering college
eee2-day4-structures engineering collegeeee2-day4-structures engineering college
eee2-day4-structures engineering college
2017eee0459
 
Operators
OperatorsOperators
Operators
VijayaLakshmi506
 
Operators
OperatorsOperators
Operators
loidasacueza
 
Chap2 class,objects contd
Chap2 class,objects contdChap2 class,objects contd
Chap2 class,objects contd
raksharao
 
Functional Programming in Java 8
Functional Programming in Java 8Functional Programming in Java 8
Functional Programming in Java 8
Omar Bashir
 
Class 6 2ciclo
Class 6 2cicloClass 6 2ciclo
Class 6 2ciclo
Carlos Alcivar
 
Java session4
Java session4Java session4
Java session4
Jigarthacker
 
FINAL_DAY9_METHOD_OVERRIDING_Role and benefits .pptx
FINAL_DAY9_METHOD_OVERRIDING_Role and benefits .pptxFINAL_DAY9_METHOD_OVERRIDING_Role and benefits .pptx
FINAL_DAY9_METHOD_OVERRIDING_Role and benefits .pptx
VGaneshKarthikeyan
 
Major Java 8 features
Major Java 8 featuresMajor Java 8 features
Major Java 8 features
Sanjoy Kumar Roy
 
control statements of clangauge (ii unit)
control statements of clangauge (ii unit)control statements of clangauge (ii unit)
control statements of clangauge (ii unit)
Prashant Sharma
 
Arithmetic Operators ____ java.pptx
Arithmetic      Operators ____ java.pptxArithmetic      Operators ____ java.pptx
Arithmetic Operators ____ java.pptx
gnyanadeepa
 
22 scheme OOPs with C++ BCS306B_module2.pdfmodule2.pdf
22 scheme  OOPs with C++ BCS306B_module2.pdfmodule2.pdf22 scheme  OOPs with C++ BCS306B_module2.pdfmodule2.pdf
22 scheme OOPs with C++ BCS306B_module2.pdfmodule2.pdf
sindhus795217
 
This is a C# project . I am expected to create as this image shows. .pdf
This is a C# project . I am expected to create as this image shows. .pdfThis is a C# project . I am expected to create as this image shows. .pdf
This is a C# project . I am expected to create as this image shows. .pdf
indiaartz
 
Object oriented programming system with C++
Object oriented programming system with C++Object oriented programming system with C++
Object oriented programming system with C++
msharshitha03s
 
Python Unit 3 - Control Flow and Functions
Python Unit 3 - Control Flow and FunctionsPython Unit 3 - Control Flow and Functions
Python Unit 3 - Control Flow and Functions
DhivyaSubramaniyam
 
C#2
C#2C#2
C#2
Sudhriti Gupta
 
Java chapter 3
Java chapter 3Java chapter 3
Java chapter 3
Munsif Ullah
 
Keyword of java
Keyword of javaKeyword of java
Keyword of java
Jani Harsh
 
Java 8 lambda expressions
Java 8 lambda expressionsJava 8 lambda expressions
Java 8 lambda expressions
Logan Chien
 
eee2-day4-structures engineering college
eee2-day4-structures engineering collegeeee2-day4-structures engineering college
eee2-day4-structures engineering college
2017eee0459
 
Chap2 class,objects contd
Chap2 class,objects contdChap2 class,objects contd
Chap2 class,objects contd
raksharao
 
Functional Programming in Java 8
Functional Programming in Java 8Functional Programming in Java 8
Functional Programming in Java 8
Omar Bashir
 
FINAL_DAY9_METHOD_OVERRIDING_Role and benefits .pptx
FINAL_DAY9_METHOD_OVERRIDING_Role and benefits .pptxFINAL_DAY9_METHOD_OVERRIDING_Role and benefits .pptx
FINAL_DAY9_METHOD_OVERRIDING_Role and benefits .pptx
VGaneshKarthikeyan
 
control statements of clangauge (ii unit)
control statements of clangauge (ii unit)control statements of clangauge (ii unit)
control statements of clangauge (ii unit)
Prashant Sharma
 
Arithmetic Operators ____ java.pptx
Arithmetic      Operators ____ java.pptxArithmetic      Operators ____ java.pptx
Arithmetic Operators ____ java.pptx
gnyanadeepa
 
22 scheme OOPs with C++ BCS306B_module2.pdfmodule2.pdf
22 scheme  OOPs with C++ BCS306B_module2.pdfmodule2.pdf22 scheme  OOPs with C++ BCS306B_module2.pdfmodule2.pdf
22 scheme OOPs with C++ BCS306B_module2.pdfmodule2.pdf
sindhus795217
 
This is a C# project . I am expected to create as this image shows. .pdf
This is a C# project . I am expected to create as this image shows. .pdfThis is a C# project . I am expected to create as this image shows. .pdf
This is a C# project . I am expected to create as this image shows. .pdf
indiaartz
 
Object oriented programming system with C++
Object oriented programming system with C++Object oriented programming system with C++
Object oriented programming system with C++
msharshitha03s
 
Python Unit 3 - Control Flow and Functions
Python Unit 3 - Control Flow and FunctionsPython Unit 3 - Control Flow and Functions
Python Unit 3 - Control Flow and Functions
DhivyaSubramaniyam
 
Keyword of java
Keyword of javaKeyword of java
Keyword of java
Jani Harsh
 
Ad

More from Shridhar Ramesh (6)

Core java
Core javaCore java
Core java
Shridhar Ramesh
 
Java Object-Oriented Programming Conecpts(Real-Time) Examples
Java Object-Oriented Programming Conecpts(Real-Time) ExamplesJava Object-Oriented Programming Conecpts(Real-Time) Examples
Java Object-Oriented Programming Conecpts(Real-Time) Examples
Shridhar Ramesh
 
Java
JavaJava
Java
Shridhar Ramesh
 
Java2
Java2Java2
Java2
Shridhar Ramesh
 
Java
JavaJava
Java
Shridhar Ramesh
 
Android
AndroidAndroid
Android
Shridhar Ramesh
 

Recently uploaded (20)

What is the Philosophy of Statistics? (and how I was drawn to it)
What is the Philosophy of Statistics? (and how I was drawn to it)What is the Philosophy of Statistics? (and how I was drawn to it)
What is the Philosophy of Statistics? (and how I was drawn to it)
jemille6
 
Grade 3 - English - Printable Worksheet (PDF Format)
Grade 3 - English - Printable Worksheet  (PDF Format)Grade 3 - English - Printable Worksheet  (PDF Format)
Grade 3 - English - Printable Worksheet (PDF Format)
Sritoma Majumder
 
apa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdfapa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdf
Ishika Ghosh
 
Ancient Stone Sculptures of India: As a Source of Indian History
Ancient Stone Sculptures of India: As a Source of Indian HistoryAncient Stone Sculptures of India: As a Source of Indian History
Ancient Stone Sculptures of India: As a Source of Indian History
Virag Sontakke
 
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptxSCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
Ronisha Das
 
Herbs Used in Cosmetic Formulations .pptx
Herbs Used in Cosmetic Formulations .pptxHerbs Used in Cosmetic Formulations .pptx
Herbs Used in Cosmetic Formulations .pptx
RAJU THENGE
 
APGAR SCORE BY sweety Tamanna Mahapatra MSc Pediatric
APGAR SCORE  BY sweety Tamanna Mahapatra MSc PediatricAPGAR SCORE  BY sweety Tamanna Mahapatra MSc Pediatric
APGAR SCORE BY sweety Tamanna Mahapatra MSc Pediatric
SweetytamannaMohapat
 
Ajanta Paintings: Study as a Source of History
Ajanta Paintings: Study as a Source of HistoryAjanta Paintings: Study as a Source of History
Ajanta Paintings: Study as a Source of History
Virag Sontakke
 
Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...
Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...
Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...
Leonel Morgado
 
How to Manage Upselling in Odoo 18 Sales
How to Manage Upselling in Odoo 18 SalesHow to Manage Upselling in Odoo 18 Sales
How to Manage Upselling in Odoo 18 Sales
Celine George
 
Myopathies (muscle disorders) for undergraduate
Myopathies (muscle disorders) for undergraduateMyopathies (muscle disorders) for undergraduate
Myopathies (muscle disorders) for undergraduate
Mohamed Rizk Khodair
 
Kenan Fellows Participants, Projects 2025-26 Cohort
Kenan Fellows Participants, Projects 2025-26 CohortKenan Fellows Participants, Projects 2025-26 Cohort
Kenan Fellows Participants, Projects 2025-26 Cohort
EducationNC
 
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulsepulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
sushreesangita003
 
Cultivation Practice of Garlic in Nepal.pptx
Cultivation Practice of Garlic in Nepal.pptxCultivation Practice of Garlic in Nepal.pptx
Cultivation Practice of Garlic in Nepal.pptx
UmeshTimilsina1
 
Exercise Physiology MCQS By DR. NASIR MUSTAFA
Exercise Physiology MCQS By DR. NASIR MUSTAFAExercise Physiology MCQS By DR. NASIR MUSTAFA
Exercise Physiology MCQS By DR. NASIR MUSTAFA
Dr. Nasir Mustafa
 
PHYSIOLOGY MCQS By DR. NASIR MUSTAFA (PHYSIOLOGY)
PHYSIOLOGY MCQS By DR. NASIR MUSTAFA (PHYSIOLOGY)PHYSIOLOGY MCQS By DR. NASIR MUSTAFA (PHYSIOLOGY)
PHYSIOLOGY MCQS By DR. NASIR MUSTAFA (PHYSIOLOGY)
Dr. Nasir Mustafa
 
All About the 990 Unlocking Its Mysteries and Its Power.pdf
All About the 990 Unlocking Its Mysteries and Its Power.pdfAll About the 990 Unlocking Its Mysteries and Its Power.pdf
All About the 990 Unlocking Its Mysteries and Its Power.pdf
TechSoup
 
LDMMIA Reiki Yoga S5 Daily Living Workshop
LDMMIA Reiki Yoga S5 Daily Living WorkshopLDMMIA Reiki Yoga S5 Daily Living Workshop
LDMMIA Reiki Yoga S5 Daily Living Workshop
LDM Mia eStudios
 
Drugs in Anaesthesia and Intensive Care,.pdf
Drugs in Anaesthesia and Intensive Care,.pdfDrugs in Anaesthesia and Intensive Care,.pdf
Drugs in Anaesthesia and Intensive Care,.pdf
crewot855
 
Grade 2 - Mathematics - Printable Worksheet
Grade 2 - Mathematics - Printable WorksheetGrade 2 - Mathematics - Printable Worksheet
Grade 2 - Mathematics - Printable Worksheet
Sritoma Majumder
 
What is the Philosophy of Statistics? (and how I was drawn to it)
What is the Philosophy of Statistics? (and how I was drawn to it)What is the Philosophy of Statistics? (and how I was drawn to it)
What is the Philosophy of Statistics? (and how I was drawn to it)
jemille6
 
Grade 3 - English - Printable Worksheet (PDF Format)
Grade 3 - English - Printable Worksheet  (PDF Format)Grade 3 - English - Printable Worksheet  (PDF Format)
Grade 3 - English - Printable Worksheet (PDF Format)
Sritoma Majumder
 
apa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdfapa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdf
Ishika Ghosh
 
Ancient Stone Sculptures of India: As a Source of Indian History
Ancient Stone Sculptures of India: As a Source of Indian HistoryAncient Stone Sculptures of India: As a Source of Indian History
Ancient Stone Sculptures of India: As a Source of Indian History
Virag Sontakke
 
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptxSCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
Ronisha Das
 
Herbs Used in Cosmetic Formulations .pptx
Herbs Used in Cosmetic Formulations .pptxHerbs Used in Cosmetic Formulations .pptx
Herbs Used in Cosmetic Formulations .pptx
RAJU THENGE
 
APGAR SCORE BY sweety Tamanna Mahapatra MSc Pediatric
APGAR SCORE  BY sweety Tamanna Mahapatra MSc PediatricAPGAR SCORE  BY sweety Tamanna Mahapatra MSc Pediatric
APGAR SCORE BY sweety Tamanna Mahapatra MSc Pediatric
SweetytamannaMohapat
 
Ajanta Paintings: Study as a Source of History
Ajanta Paintings: Study as a Source of HistoryAjanta Paintings: Study as a Source of History
Ajanta Paintings: Study as a Source of History
Virag Sontakke
 
Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...
Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...
Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...
Leonel Morgado
 
How to Manage Upselling in Odoo 18 Sales
How to Manage Upselling in Odoo 18 SalesHow to Manage Upselling in Odoo 18 Sales
How to Manage Upselling in Odoo 18 Sales
Celine George
 
Myopathies (muscle disorders) for undergraduate
Myopathies (muscle disorders) for undergraduateMyopathies (muscle disorders) for undergraduate
Myopathies (muscle disorders) for undergraduate
Mohamed Rizk Khodair
 
Kenan Fellows Participants, Projects 2025-26 Cohort
Kenan Fellows Participants, Projects 2025-26 CohortKenan Fellows Participants, Projects 2025-26 Cohort
Kenan Fellows Participants, Projects 2025-26 Cohort
EducationNC
 
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulsepulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
sushreesangita003
 
Cultivation Practice of Garlic in Nepal.pptx
Cultivation Practice of Garlic in Nepal.pptxCultivation Practice of Garlic in Nepal.pptx
Cultivation Practice of Garlic in Nepal.pptx
UmeshTimilsina1
 
Exercise Physiology MCQS By DR. NASIR MUSTAFA
Exercise Physiology MCQS By DR. NASIR MUSTAFAExercise Physiology MCQS By DR. NASIR MUSTAFA
Exercise Physiology MCQS By DR. NASIR MUSTAFA
Dr. Nasir Mustafa
 
PHYSIOLOGY MCQS By DR. NASIR MUSTAFA (PHYSIOLOGY)
PHYSIOLOGY MCQS By DR. NASIR MUSTAFA (PHYSIOLOGY)PHYSIOLOGY MCQS By DR. NASIR MUSTAFA (PHYSIOLOGY)
PHYSIOLOGY MCQS By DR. NASIR MUSTAFA (PHYSIOLOGY)
Dr. Nasir Mustafa
 
All About the 990 Unlocking Its Mysteries and Its Power.pdf
All About the 990 Unlocking Its Mysteries and Its Power.pdfAll About the 990 Unlocking Its Mysteries and Its Power.pdf
All About the 990 Unlocking Its Mysteries and Its Power.pdf
TechSoup
 
LDMMIA Reiki Yoga S5 Daily Living Workshop
LDMMIA Reiki Yoga S5 Daily Living WorkshopLDMMIA Reiki Yoga S5 Daily Living Workshop
LDMMIA Reiki Yoga S5 Daily Living Workshop
LDM Mia eStudios
 
Drugs in Anaesthesia and Intensive Care,.pdf
Drugs in Anaesthesia and Intensive Care,.pdfDrugs in Anaesthesia and Intensive Care,.pdf
Drugs in Anaesthesia and Intensive Care,.pdf
crewot855
 
Grade 2 - Mathematics - Printable Worksheet
Grade 2 - Mathematics - Printable WorksheetGrade 2 - Mathematics - Printable Worksheet
Grade 2 - Mathematics - Printable Worksheet
Sritoma Majumder
 

Java(Access Modifiers)

  • 3.  Final  Synchronized  Abstract  static
  • 4.  The final keyword prevents a method from being overridden in a subclass class SuperClass{ public final void showSample() { System.out.println("One thing."); } } class SubClass extends SuperClass{ public void showSample() { // Try to override the final // superclass method System.out.println("Another thing."); } }
  • 5. class Bank { int accountBalance ; public Bank(){ accountbalance = 10000; } Synchronized void BalanceInquiry(){ System.out.println(“account balance is :”+accountbalance); } }
  • 6. abstract class Hotel { public void Idli(){ System.out.println(“Prepare Idli”); } abstract public void Dosa(); }
  • 7. class Pageview { public static final int count = 0; public Pageview() { count++; System.out.println(“Number of views to website”+count); } public static void main(String args[]) { Pageview p = new Pageview(); } }
  • 8.  Arithmetic Operators  Relational Operators  Bitwise Operators  Logical Operators  Assignment Operators
  • 16.  Bitwise operator works on bits and performs bit-by-bit operation. Assume if a = 60; and b = 13; now in binary format they will be as follows:  a = 0011 1100  b = 0000 1101  ------------------------------------------------------------------------------------------  a & b = 0000 1100  a || b = 0011 1101  a ^ b = 0011 0001  ~a = 1100 0011
  • 25.  Conditional Operators are also called ternary operator  This operator consists of three operands.  It is used to evaluate an expressions  Syntax: variable x = (expression) ? value if true : value if false
  • 26. public class Test{ public static void main(String args[]) { int a, b; a = 10; b = 20; ( a > b ) ? a : b ; ( a <10 ) ? a : b ; } }
  • 27.  Methods declared public in a superclass also must be public in all subclasses.  Methods declared protected in a superclass must either be protected or public in subclasses; they cannot be private.  Methods declared without access control (no modifier was used) can be declared more private in subclasses.  Methods declared private are not inherited at all, so there is no rule for them.