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 tcp and udp?
What is a 16 bit word?
What is the difference between final, finally and finalize()?
In how many ways we can do synchronization in java?
Is null false in java?
What is the arraylist in java?
Explain creating threads by extending thread class ?
What is the difference between == and === javascript?
What do you mean by ordered and sorted in collections in java?
Is array primitive data type in java?
What is byte [] in java?
How will you compute size of a structure?
What is java command?
What is variable argument in java?
Give us the name of the list layoutmanagers in java?