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

Difference between linkedlist and arraylist.

819


What differences exist between iterator and listiterator?

828


What are the legal operands of the instanceof operator?

798


Which is easier netbeans or eclipse?

824


How do you empty a list in java?

773


Explain about exception propagation?

775


If try block is successfully executed, Then Is Finally block executed?

841


What is entry set in java?

749


How to do encapsulation in java?

830


What is difference between filereader and bufferedreader?

738


What is unicode used for?

839


What is a method declaration?

743


What is the advantage of preparedstatement over statement?

834


How does thread synchronization occurs inside a monitor?

786


Explain the inheritance?

774