• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

where you can see static

 
Ranch Hand
Posts: 281
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm working on compiling my notes and want to make sure what I am adding here is correct and that I'm not leaving anything out (in reference to when you can use static):
"The only time you can use static in a program is when it is declaring fields(variable,blocks,methods) within the body of a non inner class
OR within the body of a top-level-nested class
OR within the body of an inner class ONLY when it is declared final."
Thanks for double checking this.
 
Sheriff
Posts: 9109
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The only time you can use static in a program is when it is declaring fields (variables), blocks, methods and inner classes within the body of a top level (non-inner) class OR within the body of a top-level-nested class OR within the body of an inner class ONLY when it is declared final.

With some slight modifications to your statement I would agree.
[ February 03, 2002: Message edited by: Marilyn deQueiroz ]
 
Rick Reumann
Ranch Hand
Posts: 281
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Marilyn deQueiroz:
The only time you can use static in a program is when it is declaring fields (variables), blocks, methods and inner classes within the body of a top level (non-inner) class OR within the body of a top-level-nested class OR within the body of an inner class ONLY when it is declared final.

With some slight modifications to your statement I would agree.
[ February 03, 2002: Message edited by: Marilyn deQueiroz ]


Thank you! Much better.
 
reply
    Bookmark Topic Watch Topic
  • New Topic