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

What is public/private protected in java?

989


What is the difference between a window and a frame in java programming?

1079


What is consumer in java?

918


Can an arraylist be empty?

1002


What is rmi and steps involved in developing an rmi object?

990


What is the effect of keeping a constructor private?

871


What is considered an anti pattern?

874


What is the difference between inner class and nested class?

1005


How do I convert a string to an int in java?

1010


What is difference between == equals () and compareto () method?

979


What is default exception handling in java?

971


Does java set allow duplicates?

1025


What is indexof?

913


What is the difference between Java1.4 and Java1.5

2252


What are the benefits of operations in java?

940