default specifier specifies access level of class
eg:-
class A{
}
this is default
default constructor is constructor with same name as of
class and no arguments
eg: class A{
A()
}
there is no default method in java
DEFAULT SPECIFIER IN JAVA:
There are 4 types of accessibility specifier in java, they
are private,public,protected and default.
There is no key word in java to specify default specifier
When we do not specify any specifier which means default
specifier,
For Example :
public String getName(){...}
// here accessibility specifier is public
String getName(){...}
// here accessibility specifier is defalut, whose scope
is package-scope means this method is not accessible outside
the current package
DEFAULT CONSTRUCTOR IN JAVA:
Default constructor is the implicit constructor provided by
the compiler when we do not specify any constructor in our class
Default constructor looks like..
---------------------------------
<Access Modifier> <class_name>(){
super();// implicit super call
}
I have not heard about any default method in java..As far my
knowledge there is no default method till JAVA platform 1.4....
Default Specifier is : friendly. but there is no keyword
provided by java
Default Construtor is : the constructor of top level super
class of each java class that is "Object" class.
Default Method is : main method that would called by
default through the java interpretor.
DEFAULT SPECIFIER IN JAVA IS CALLED AS PACKAGE ACCESS
DEFAULT SPECIFIER IN JAVA IS CALLED AS CLASS NAME() WHICH
WAS PROVIDED BY COMPILER DURING COMPILATION TIME
THERE IS NO DEFAULT METHOD IN JAVA
in a constructor what happen if u call super and this in
the same class? i know that it is not possible to call
both in the same one? if we call what will happen?