File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes can any method contain (static/non static) variables? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "can any method contain (static/non static) variables?" Watch "can any method contain (static/non static) variables?" New topic
Author

can any method contain (static/non static) variables?

sarim raza
Ranch Hand

Joined: Nov 02, 2000
Posts: 232
anyone help?
Harpal Singh
Ranch Hand

Joined: Oct 10, 2000
Posts: 229
Sarim,
Only class variables can be static or non static..other than the class....no other method let it be static method or non-static...cannot have static variables.......Methods can contain non-static variables.......because when you say something as static that means it belongs to the class as a whole not to any particular method or instance.......
Harpal
 
 
subject: can any method contain (static/non static) variables?
 
Similar Threads
Single tone Vs Static
WA #1.....word association
static and non static methods
property file dynamic vs static
static and non static methods