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
Does constructor be static?
What is the most important feature of java? What is an interface?
What is indexof?
What is application system?
How many threads can I run java?
Define iterator and methods in iterator?
Can we override singleton class?
What’s the difference between unit, integration and functional testing?
What was java originally called?
How we can execute any code even before main method?
Can we make the abstract methods static in java?
What are the differences between Java 1.0 and Java 2.0?
What is difference between variable declaration and definition?
Explain importance of inheritance in java?
What are voids?