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,









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'
Why is the main method declared static?
Can you create an object of an abstract class?
Can you instantiate the Math class? - Java Beginners
Can we instantiate abstract class in Java?
Example of a class variable (static variable)
HttpServlet is declared abstract
Inner class in java
can we use class in jsp which implements interface
Can a abstract class be defined without any abstract methods?
java anonymous class
Can I have multiple main() methods in the same class?
How can i pass the valus from a JSP to the action class???
Class
can we add primitive data to wrapper class object
can we use scanner class,class , object and methods to get output without using constructor ????
What if the main() method is declared as private?
class
class
Explain final class, abstract class and super class.
abstract class
Should a main method be compulsorily declared in all java classes?
are my declared varibles right - Java Beginners
Java Abstract Class Example
My Base Class is Changing every time in my code. How I can overcome this?
can i restrict a class that it will not allows create more than two objects - Java Interview Questions
can we mark the class with abstract..with out having any mothed in tit as abstract!!! - Java Beginners
Using HeaderFooter class of iText API , Can we display multiple phrases in the footer section of PDF ,each with different alignment.
Class and Instance
Java nested class example
PHP Class Object
Static Nested Classes
struts2 how can we add an radio button to form using a class(doa)
struts2 how can we add an radio button to form using a class(doa)
Please tell me how I can access a field (data type char) of resultset in a java class
Super class of an Exception class
Interface and Abstract class
Inheritance example in JRuby

Ads