wHAT IS DEFAULT SPECIFIER IN JAVA
wHAT IS DEFAULT CONSTRUCTOR IN JAVA
wHAT IS DEFAULT METHOD IN JAVA

Answer Posted / safikur

default specifier in java is DEFAULT
which can only be visible within the same package.
You can't access any default member of a class directly
from outside the package , you can access those member
through another method of that class.

default CONSTRUCTOR in java is the constructor which has
the same name of the class and has no arguments. if you
define at least one constructor in a class JVM will not put
the default constructor in the class like..

public className(){super();}

if there is no constructor in the class JVM will put the
default constructor in the class like..

public className(){super();}

since its not visible. but implicitly defined by compiler..


there is no concept of DEFAULT method in java spec.

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does replaceall do in java?

574


Is alive in java?

594


Is sizeof a preprocessor?

635


Are true and false keywords?

687


Is it safe to install java on my computer?

642






Difference between string, string builder, and string buffer?

616


What is a finally block? Is there a case when finally will not execute?

642


Is it possible to instantiate the abstract class?

627


Does string isempty check for null?

673


How can we create an immutable class in java?

672


What is a concrete classes? Is Java object class is concrete class?

615


Why is java logo a cup of coffee?

705


I want to re-reach and use an object once it has been garbage collected. How it's possible?

659


Why are functions called methods in java?

635


What does the three dot emoji mean?

679