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 the covariant return type?
How do we access static members in java?
What is %d in printf?
Is set ordered in java?
How concurrent hashmap works?
What is string subsequence method?
What happens if we override only equals?
Why Set interface contains unique elements, what internally implemented for this so that it contains unique elements?
How are the elements of a gridbaglayout organized?
How many JVMs can run on a single machine and what is the meaning of Just-In-Time (JIT) compiler?
define the terminology association.
How do you break a loop?
What are the different ways to handle exceptions?
How to create packages in java?
Can an interface be final?