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

How define set in java?

507


Difference between process and thread?

595


Compare java and python.

573


What is the purpose of static keyword in java?

509


Write a program to print all permutations of string?

673






What is method in research paper?

569


When can an object reference be cast to an interface reference in java programming?

575


What is immutability in java?

600


What is a boolean expression in java?

528


How many types of methods are there?

542


What are keywords give examples?

576


What is map in java?

514


What are the various access specifiers in java?

561


What does it mean to be immutable?

544


Can we inherit a class with private constructor?

564