Can a class be declared as protected?

Can a class be declared as protected?

Hi,

Can a class be declared as protected?

thanks

View Answers

April 11, 2013 at 1:16 PM

Hi,

A class can't be declared as protected. only methods can be declared as protected.

http://www.roseindia.net/java/master-java/method_overriding.shtml

This link will helpful to you.

thanks,

Ads









Related Tutorials/Questions & Answers:
Can a class be declared as static?
Can a class be declared as protected?
Advertisements
Can a abstract class be declared final?
variables and methods declared in abstract class is abstract or not
Can a main method be declared final?
Can a method inside a Interface be declared as final?
Can a method inside a Interface be declared as final?
Java Abstract Class
Can a Class extend more than one Class?
there are class A & class B.How can i get members of class A& B?
Abstract Class in Java
ModuleNotFoundError: No module named 'declared'
ModuleNotFoundError: No module named 'declared'
Can you create an object of an abstract class?
Can we instantiate abstract class in Java?
Why is the main method declared static?
Example of a class variable (static variable)
Inner class in java
can we use class in jsp which implements interface
Can a abstract class be defined without any abstract methods?
Class
Can I have multiple main() methods in the same class?
How can i pass the valus from a JSP to the action class???
can we use scanner class,class , object and methods to get output without using constructor ????
class
Explain final class, abstract class and super class.
abstract class
What if the main() method is declared as private?
Should a main method be compulsorily declared in all java classes?
Java Abstract Class Example
My Base Class is Changing every time in my code. How I can overcome this?

Ads