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 are the 4 types of characters?

1057


What does g mean in regex?

1034


How to calculate the length of a singly linked list in java?

1091


What is a string what operation can be performed out with the help of a string?

1109


What is size () in java?

1151


What does the @override annotation do?

1094


What is a function in programming?

1102


What is the list interface?

1129


how can you catch multiple exceptions in java?

1067


What does it mean that a method or field is “static”?

1024


Can you declare an interface method static?

1107


When the constructor of a class is invoked?

1090


How would you use Bubble Sort to sort the number of elements?

1059


How many bits is size_t?

1031


What is instance means in java?

1098