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

Which class contains a method: cloneable or object?

786


Can we create an object if a class doesn't have any constructor ( not even the default provided by constructor ) ?

787


Which class cannot be a subclass in java?

748


What does percent mean in java?

805


How do you reverse a word in java?

768


What is serialversionuid?

791


What is passed by reference and pass by value ?

790


How many bytes is a string?

850


What is difference between null and void?

744


What is the collections api in java programming?

786


Why does it take so much time to access an applet having swing components the first time?

1692


Where is core java used?

785


Explain about exception propagation?

777


What are different access specifiers in java? Explain

850


What are the differences between getting and load method?

764