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

How many bytes is a string?

820


What is the difference between an argument and a parameter?

737


Can two objects have same hashcode?

735


What is constructor chaining in java?

813


What is wrapper class example?

728


Why java is made?

749


What are actual parameters?

720


Can a function return a function?

766


Why is inheritance used in java?

816


Is java util regex pattern thread safe?

725


What is numeric data type?

731


What is java objectoutputstream?

731


Difference between default and protected access specifiers?

723


How many bits is a char?

721


What is the use of StringTokenizer class?

806