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 you explain the usages of class.forname()?
What is the purpose of static methods and variables?
Can we synchronize static methods in java?
What is formatted output?
Why is boolean important?
What are recursive functions? Give some examples?
How do you input a string in java?
What is the difference between Java1.4 and Java1.5
Should you use singleton pattern?
What is anti pattern in cyber security?
What are the two types of exceptions in java? Which are the differences between them?
Can we override compareto method?
What is the purpose of static keyword in java?
What is a buffer in computer?
How many wrapper classes are there in java?