Is it possible to create object with out its default
constructor? if possible how? else not possible? justify
Answer Posted / ravi
class C
{
void show()
{
System.out.println("hi");
}
public static void main(String args[])
{
C c=new C();
c.show();
}
}
we can create object if we don't write the constructor try
execute the above code and see the result; THANK u
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
how to prepare for IT Officers Interview in Banks
what are three ways in which a thread can enter the waiting state? Or what are different ways in which a thread can enter the waiting state? : Java thread
What is string data?
Is string is a data type?
What is the difference in between cpp and java? Can u explain in detail?
What is floating data type?
Where is java located?
Can we override the static methods?
Can a class be final?
Can you instantiate the math class in Java?
What is the default size of arraylist in java?
What things should be kept in mind while creating your own exceptions in java?
Can we change the value of static variable?
What are the access modifiers in java?
Explain a few methods of overloading best practices in java?