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


Please Help Members By Posting Answers For Below Questions

What is a string token?

773


How are the elements of a gridbaglayout organized?

823


Is java a pure object oriented language?

758


What are measurable parameters?

820


Is void a wrapper class?

758


Explain the importance of finalize() method.

784


What is an immutable object?

816


How to do encapsulation in java?

846


What is array pointers ?

836


Is string thread safe in java?

863


What are recursive functions? Give some examples?

897


What language is java written?

796


What is a variable and constant?

797


How to create a thread in java?

904


What is arrays aslist in java?

757