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

What is a byte array?

589


Explain jdk, jre and jvm?

567


State the difference between strings and arrays.

603


What is the current version of java?

545


How many types of operators are there?

526






What is bufferedreader in java?

580


What is an infinite loop? How infinite loop is declared?

572


What is the maximum size of byte array in java?

542


How do you square a number in java?

558


What are use cases?

561


How to create com object in Java?

651


Will minecraft java be discontinued?

650


What is run time allocation?

579


Assume a thread has lock on it, calling sleep() method on that thread will release the lock?

627


What means public static?

562