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

Give an example of call be reference significance.

986


Is map sorted in java?

1015


What is arrays sort in java?

916


What are Normalization Rules? Define Normalization?

987


What is meant by object oriented programming – oop?

929


Why is an interface be able to extend more than one interface but a class can’t extend more than one class?

1118


Can we override tostring method in java?

934


Can we use a default constructor of a class even if an explicit constructor is defined?

1056


What is the exact difference in between Unicast and Multicast object?

2054


What ide should I use for java?

967


What is public static void main?

1051


How do I enable java in safari?

987


What is a variable in java?

1046


How do you create immutable object in java?

996


Write a function to find out longest palindrome in a given string?

1008