jQuery in Action, 3rd edition
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes static variable inside a function 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 "static variable inside a function" Watch "static variable inside a function" New topic

static variable inside a function

jason picardo

Joined: Oct 29, 2000
Posts: 14
I hava a samll problem please help me out.
I tried to declare a static variable inside a funtion,the compiler gave me a error. I want to know why it is not possible to declare a static variable inside a function in java where as
it possible in c++.
E-mail: jason_jp@usa.net
[This message has been edited by jason picardo (edited November 16, 2000).]
Mary Anitha

Joined: Oct 13, 2000
Posts: 23
We cannot declare static variables inside a method
coz the scope will be limited to that method
asim wagan
Ranch Hand

Joined: Nov 14, 2000
Posts: 62
Understand this way:
non static variables are for classes ,methods.
static variables remember are always for classes.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: static variable inside a function
It's not a secret anymore!