How can a class be accessed, If no access modifiers are
declared?

Answer Posted / babu

If a there is no access modifier specified to a class then it
takes the access modifier as Default modifier.Default Access modifier scope is package scope.so this class scope also package scope to access the classes which is having in the same package.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is diamond operator in java?

493


What is the difference between size and length in java?

506


How can an exception be thrown manually by a programmer?

507


What is the escape character in java?

509


What is struts in java?

569






Difference between serialization and deserialization in java?

650


What are keywords give examples?

576


What are the types of java?

600


How to sort list of list in java?

655


What are the five major types of reference sources?

527


How many bytes is a string in java?

527


What are the differences between graph and tree?

641


What is the difference between instanceof and isinstance?

559


Why generics are used in java?

545


Why are the objects immutable in java?

542