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

Is hashset ordered java?

1041


Can you inherit a constructor java?

1028


How does varargs work in java?

1047


What is constructor in java ?

1128


What is canonical name in java?

1063


What is the function of character?

1014


What is the use of set in java?

1072


what is thread? What are the high-level thread states? Or what are the states associated in the thread? : Java thread

948


What does exclamation mean in java?

1029


How to connect to a remote database using Applet?

2490


What is the purpose of sizeof operator?

988


What is synchronization and why is it important in java programming?

889


enlist some features of jdk.

912


Can a constructor call another constructor?

934


What is the need of transient variables in Java ?

1035