Answer Posted / shekhar suchak
private:it can be access within the block or we can aslo say that within the class.
public:"every where,any where" just one line ans.
protected:it can be access within package and outside of package.but there should be inheritense.
default:it will be access within the package.
class can not be private and protected.its only default and public.we dont have to mention 'default' keywords it always be there,but invisible.
Thanks & Regards
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is use of super keyword in java?
Is void a data type in java?
What is an example of character?
Explain about abstract classes in java?
What is the inheritance?
Explain different states of a thread in java?
What are the ways in which a thread can enter the waiting state?
What is nextline method in java?
Define jre i.e. Java runtime environment?
What is the Scope of Static Variable?
Does .length start 0 java?
What is parameters example?
How are the elements of a gridbaglayout organized in java programming?
What is implicit object in java?
What is an interface in java? Explain