[5879] in java-interest

home help back first fref pref prev next nref lref last post

Re: Static variable assigment

daemon@ATHENA.MIT.EDU (dave collier)
Fri Mar 1 17:22:30 1996

Date: Fri, 1 Mar 1996 13:08:18 -0800
To: vitaly@diogen.asc.rssi.ru (Vitaly Promislov), java-interest@java.sun.com
From: dc@symbolicsoft.com (dave collier)

The variable is not a static one, but the function that references it is.

If you only need one instance of that variable, quick fix is just to prefix
the variable declaration with static:

  static private int server_port=DEFAULT_PORT;

Otherwise, if main was a normal method, you could remove the static keyword
from its definition.

dc

___________________________________________________________________

     /\    dave 'dc' collier
    /_/\     Symbolic Software, Inc.
   /_\_ \      dc@SymbolicSoft.com
  /___/__\       tel (415) 546 1295

      use your Head or lose your Mind!  http://www.BurnCycle.com


-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com

home help back first fref pref prev next nref lref last post