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 does void * mean?
What is exception hierarchy in java?
How do you sort arrays in java?
List the different types of classloaders in java.
Is array synchronized in java?
What is meant by main method?
What is the size of int in 64-bit jvm?
What is the difference between hashmap and hashtable in java?
What is the difference between the final method and abstract method?
What is the use of inner class?
Explain the use of volatile field modifier?
What are invisible components?.
What are java threads?
How many types of string data types are there?
What is the equal sign?