Win a copy of Android Programming: The Big Nerd Ranch Guide this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Static class??  RSS feed

 
Vishnu Sharma
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can we make any class static?? Or only methods & variables in a class can be static??
 
Devaka Cooray
Marshal
Posts: 5391
612
Chrome Eclipse IDE Google App Engine IntelliJ IDE jQuery Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
a nested class can be static
 
Vishnu Sharma
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Devaka Cooray wrote:a nested class can be static


I did not get you properly. Can you please, explain a bit more giving any small example??
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 15953
86
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Example:

For more information, see: The Java Tutorials - Nested Classes
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!