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

What is use of static method?

1007


What is nested class?

954


What is 16 bits called?

899


What are the topics in core java?

1019


What does 3 dots mean in java?

940


Can we overload the methods by making them static?

955


What are the two types of java?

1082


What is string value?

1103


Name and explain the types of ways which are used to pass arguments in any function in java.

1029


What is the purpose of the finalize() method?

1193


How do you allocate memory to object?

934


What is finally in Java?

1026


What is stream api in java8?

1093


What is an example of character?

1073


Are maps ordered java?

905