what is the difference between the "protected and default"
modifiers?

Answer Posted / ravikiran

protected access is with in the same package and subclasses
outside the package
default access is with in the same package only

Is This Answer Correct ?    38 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When object is created and destroyed?

857


What is java ceil?

805


What is the difference between reader/writer and inputstream/output stream?

805


Why does java have two ways to create child threads?

705


What are the types of arrays in java?

851


What is a parameter in java?

766


How does the java compiler work?

752


What is broken and continue statement?

778


Why is java called the platform independent programming language?

808


What is meant by object?

801


what are synchronized methods and synchronized statements? : Java thread

799


How do you add an element to a set in java?

799


How to make object serializable in java?

777


Explain enumeration in java?

796


How do you declare a variable?

861