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 object for static class in java

Answer Posted / ashlesha sharma

there are two types of classes..
1.Top level class
2.inner class

top level classes cant be declared as static.Its a
compilation error.

inner classes can be declared as follows:
1.Anonymous classes: cant be declared as static.
2.Local classes: cant be declared as static.
3.member classes: the only class that can be declared as static.
4.nested loop level class:A nested top-level class is a
member classes with a static modifier. A nested top-level
class is just like any other top-level class except that it
is declared within another class or interface.

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain creating threads by extending thread class ?

1009


What is the new line character?

1108


What are the different http methods?

975


What is the syntax and characteristics of a lambda expression? Explain

993


What is a data structure java?

952


What are the advantages of encapsulation in java?

955


What is module in oop?

960


What is yield () in java?

834


What is difference between array and vector?

1044


What is the significance of listiterator?

1020


What is the difference between the paint() and repaint() methods in java programming?

1131


Can we call virtual funciton in a constructor ?

2135


Can a class have multiple subclasses?

1051


what is anonymous class in java?

977


What is a get method?

976