
- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
method overriding with access modifiers in Java
Yes, we can override a method by changing only the access modifiers in java pertaining the following rule:
The access level cannot be more restrictive than the overridden method's access level. For example: If the superclass method is declared public then the overriding method in the subclass cannot be either private or protected.
- Related Questions & Answers
- java access modifiers with method overriding
- Access Modifiers in Java
- What are access modifiers and non-access modifiers in Java?
- Access and Non Access Modifiers in Java
- Non Access Modifiers in Java
- What are the differences between access modifiers and non-access modifiers in Java?
- Types of access modifiers in Java?
- Access Modifiers in C#
- Access Modifiers in C++
- Method overriding in Java
- Exception handling with method overriding in Java.
- How many non-access modifiers are there in Java?
- What are access modifiers in C++?
- Rules for Java method overriding
- overriding method different package in java
Advertisements