Explain the differences between public, private, protected
and static?
Answer Posted / manne ranjith
public-->inherite the protected members as preotected in
drived class and pubic members wiull be public in derived
class
protected--->pubic and protecated members of the base class
will become protected in derived class
Private-->pubilc and proteacted members will become private
in derived class
static--->Method is defined by static cannot access non-static
members or fields of that class. But non-static members can
access static fields or methods.
Is This Answer Correct ? | 28 Yes | 32 No |
Post New Answer View All Answers
What is the function of http?
How do you sort an array in java?
what do you mean by marker interface in java?
What is unicode with example?
Does java list allow null?
Can a hashset contain duplicates java?
What is toarray method in java?
What does yield method of the thread class do?
What is a singleton in genetics?
How to find the index of the largest number in an arraylist java?
What interface is extended by awt event listeners?
What is a treeset in java?
Why object class is super class for every class in java?
What is a null point?
What is unicode full form?