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 return in java?

1020


Can a lock be acquired on a class in java programming?

1042


What is assembly condition codes?

1037


What is the use of math abs in java?

1059


Can I declare class as static or private?

1010


What is 16 bits called?

983


Is java owned by oracle?

1067


If system.exit (0); is written at the end of the try block, will the finally block still execute?

1157


Which is better stringbuilder or stringbuffer?

990


Explain the features of interfaces in java?

1031


How do you call a reference in java?

1035


What are the main features of java?

1013


How will you communicate between two applets?

1208


Can I override protected method in java?

1125


What is method overloading in JAVA? Why is it not present in C ?

1142