The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
July 2000

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

static variables in static functions

Posted by aarti on July 22, 2000 at 1:08 PM

Hi,
Why I am not able to declare static variables in static functions? It is possible overcome this limitation. But does the java language syntax impose such a restriction?

static int statFunc()
{
static int i=8;
}
generates an error .

Sorry if this question is redundant

Aarti




Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us