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


Please Help Members By Posting Answers For Below Questions

Explain the scope of a variable.

622


Can you make a constructor final?

570


Tell me the Importent classes in net package?

1578


When will you define a method as static?

542


What are constants?

590






Does java have extension methods?

517


Why vector class is used?

533


Difference between method overloading and method overriding in java ?

556


Why constructor has no return type?

632


State some advantages of java?

705


What is the difference between a break statement and a continue statement?

587


How do you remove duplicates in java?

514


Does java vector allow null?

528


What are the basic concepts of OOPS in java?

561


What are the 8 primitive data types in java?

537