Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

Why java do not have access specifier ?

user-image
Question added by Mohd shahnawaz khan , Associate Project , Cognizant Technology Solution
Date Posted: 2014/12/27
Deleted user
by Deleted user

Note that you can't reduce the visibility of a method or field as it would cause issues with passing the subclass to a method that needs the superclass.

mohamad saeed al sayed suliman
by mohamad saeed al sayed suliman , Senior Software Engineer , Saudi Telecom Company - Stc

it have4 access specifiers [ Private, Default, Protected, Public ]

 

Deleted user
by Deleted user

In Java, the physical mechanism of inheritance is used only for classes that are intended to logically inherit from their superclass.

 

Meanwhile java is a pure Object Oriented language.

More Questions Like This