What is default specifier ??? Use of default specifier ???

Answer Posted / prativa mohapatra

Java provides a default specifier which is used when no
access modifier is present. Any class, field, method or
constructor that has no declared access modifier is
accessible only by classes in the same package. The default
modifier is not used for fields and methods within an
interface.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain java coding standards for classes or java coding conventions for classes?

622


What are the types of arrays in java?

563


what is instanceof operator used in java?

597


What is the difference between static and global variables and also define what are volatile variables?

559


How many static init can you have?

690






How is hashset defined in java?

521


What is the difference between preemptive scheduling and time slicing in java programming?

541


What is the base class in java from which all classes are derived?

523


What is used of static keyword in java?

594


What is preparedstatement in java?

566


What is function overriding and overloading in java?

587


What if the main() method is declared as private? What happens when the static modifier is removed from the signature of the main() method?

694


What is the output of the below java program?

599


What environment variables do I need to set on my machine in order to be able to run java programs?

609


Can we have any other return type than void for main method?

542