wHAT IS DEFAULT SPECIFIER IN JAVA
wHAT IS DEFAULT CONSTRUCTOR IN JAVA
wHAT IS DEFAULT METHOD IN JAVA
Answer Posted / vipin dhiman
in java default specifier is public but within the
samepackage.due to this property of public within same
package we have to define public before the main method
bcoz main has to be taken from jdk which is like the
different package. So if we want to anythig accessing to
the diffrent package we have to declare that with the
public keyword explicitly.
default constructor in java is same name of the class whose
object has to be declared.
example
class v
{
public static void main(String vip[])
{
System.out.println("i am vip");
}
in this default constructor is v();
as much as i know ,there is no concept of default method
| Is This Answer Correct ? | 1 Yes | 2 No |
Post New Answer View All Answers
What is difference between core java and java ee?
What is a method signature java?
What is the difference between final, finally and finalize() in java?
Define inheritance?
What is native method in java?
Which is fastest collection in java?
Explain an intermediate language?
what is the difference between future and callable interface in java?
Is a case study a method or methodology?
Can sleep() method causes another thread to sleep?
define polymorphism in java
whar are the draw backs of programming lang step by step in Clang and next in C++ and next and in Java nad in .Net
Are arrays primitive data types?
What is adapter in java?
What are the states of thread in java?