• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Marcus Green's site

 
Stephanie Grasson
Ranch Hand
Posts: 347
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
On Marcus Green's site he states that:
"The modifier static can be applied to a class, a method and a variable".
I understand the difference between static and instance variables and methods, but I've never seen this modifier applied to a class. Can anyone tell me how it is applied or maybe give an example?
Thanks in advance.
 
Sarang Khankhojr
Greenhorn
Posts: 17
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
The static modifier for the class will be in inner class situation. It's meaning is similar that it does not have
any reference to an enclosing reference and you can instantiate the static class without outer class.
Hope this helps.
Sarang
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic