wHAT IS DEFAULT SPECIFIER IN JAVA
wHAT IS DEFAULT CONSTRUCTOR IN JAVA
wHAT IS DEFAULT METHOD IN JAVA
Answer Posted / liza
A>Default specifier in java is friendly,but there is no
keyword for it.When we simply write:
class{
........
}
JVM assumes it as having default specifier.Friendly
specifier tells the JVM that this class is accessible to all
the classes but in the same package.
B>Default constructor:it has the same name as that of the
class.It takes no arguments.It is the implicit constructor
and automatically generated in the absence of explicit
constructor.It calls the superclass constructor using super().
C>Default method:There is no default method in java.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Can we have multiple public classes in a java source file?
What is ellipsis in java?
What are reference variables in java?
What defines function?
In a class implementing an interface, can we change the value of any variable defined in the interface?
What is the purpose of a parameter?
What restrictions are placed on method overloading in java programming?
How can we run a java program without making any object?
What comes to mind when someone mentions a shallow copy in java?
What is identifier in java?
What is meant by object?
what are the high-level thread states? : Java thread
Why we use methods in java?
What is data type in computer?
What is the difference between jdk, jre, and jvm?