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...

can we create a object in static block
class A
{
static {
A a=new A();
}
}

Answer Posted / naresh tuhania

Yes we can do this . Because we can create an object at
runtime and static block is also execute when a class is
loaded by the class loader at runtime

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between awt and swing?

1054


What is the purpose of action interface in swing?

1049


Which method of the Component class is used to set the position and size of a component?

992


Why swing is better than awt?

1017


Why swings are used in java?

963


Who created the swing?

929


Which layout does swing use by default?

985


Is swing part of core java?

1009


What is swing gui in java?

1097


Is java swing a framework?

1032


What are the swing components?

947


Why swing components are called lightweight components?

963


What are swing components?

1076


Which swing methods are thread-safe?

1116


What is java swing gui?

906