Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Is it possible to create object with out its default
constructor? if possible how? else not possible? justify

Answer Posted / suresh royal

yes we can create object without using default constructor.
we can use argument constructor...
this is the example prg
===========================================
class ExArgCon
{
ExArgCon(int a)
{
System.out.println("arg constroctor");
}
public void m1()
{
System.out.println("m1() method");

}
public static void main(String[] args)
{
ExArgCone = new ExArgCon(10);
e.m1();
}
}

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write code of any action class?

1015


What is udp in java?

978


Which is best ide for java?

1044


What are assembly attributes?

1008


Which is the best approach for creating thread ?

1216


What is the benefit of using enum to declare a constant?

1103


What is static class

1116


Can we change the value of static variable?

961


Why convert an applet to an application?

1104


Is java free for commercial?

922


How do you clear an arraylist in java?

985


What is navigable map in java?

987


What is complexity and its types?

1031


What are the two categories of data types in the java programming language?

991


Can a class be a super class and a sub-class at the same time? Give example.

1563